加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

Stata Tips:5个列子明白suest命令

(2013-10-23 18:47:14)
分类: 经济学家们
suest — Seemingly unrelated estimation(似不相关的估计)
尤其Example2 的chow test 很有用!

Example 1: A Hausman test

    . webuse sysdsn4
    . mlogit insure age male
    . estimates store m1, title(all three insurance forms)

    . quietly mlogit insure age male if insure != "Uninsure":insure
    . estimates store m2, title(insure != "Uninsure":insure)

    . quietly mlogit insure age male if insure != "Prepaid":insure
    . estimates store m3, title(insure != "Prepaid":insure)

    . hausman m2 m1, alleqs constant
    . hausman m3 m1, alleqs constant


Example 2: Do coefficients vary between groups? ("Chow test")

    . webuse income
    . regress inc edu exp if male
    . estimates store Male

    . regress inc edu exp if !male
    . estimates store Female

    . suest Male Female
    . test [Male_mean = Female_mean]


Example 3: A nonlinear Hausman-like test

    . webuse income
    . probit promo edu exp
    . estimates store Promo

    . regress inc edu exp
    . estimates store Inc

    . suest Promo Inc
    . testnl [Promo_promo]edu/[Promo_promo]exp = [Inc_mean]edu/[Inc_mean]exp


Example 4: Using suest with survey data, the svy prefix

    . webuse nhanes2f
    . svyset psuid [pw=finalwgt], strata(stratid)
    . svy: ologit health female black age age2
    . estimates store H5

    . gen health3 = clip(health,2,4)
    . svy: ologit health3 female black age age2
    . estimates store H3

    . suest H5 H3
    . test [H5_health=H3_health3]
    . test ([H5_cut2]_cons=[H3_cut1]_cons) ([H5_cut3]_cons=[H3_cut2]_cons)


Example 5: Using suest with survey data, the svy option

    . webuse nhanes2f, clear
    . svyset psuid [pw=finalwgt], strata(stratid)
    . ologit health female black age age2 [iw=finalwgt]
    . estimates store H5

    . gen health3 = clip(health,2,4)
    . ologit health3 female black age age2 [iw=finalwgt]
    . estimates store H3

    . suest H5 H3, svy
    . test [H5_health=H3_health3]
    . test ([H5_cut2]_cons=[H3_cut1]_cons) ([H5_cut3]_cons=[H3_cut2]_cons)

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有