007029 发表于 2011-7-29 03:17 
请问为什么第三个命令中没有incFancy、kidFancy(即Fancy类别与income、kid的交互项)?
因为主要的原因,这是比较受限【restrict】与未受限【因为未受限,所以完全,full】模型的豪斯曼检验。
两模型的比较,经常用Hausman test,所以它很弹性地。
常见的有:
虚无假设我就不多废话了
一致 【先摆,这是指使用stata的hausman指令后的位置】
IV FE RESTRICT
有效 【后摆,这是指使用stata的hausman指令后的位置】
OLS RE FULL
如果喜欢看SAS的,
可以参考以下网页
http://support.sas.com/documentation/cdl/en/etsug/60372/HTML/default/etsug_mdc_sect038.htm
楼主提出的例子,网站上恰好有相当类似的,大家可以看看并学习
http://www.cba.ua.edu/assets/docs/jlee/ec671/extended_choice.do
最后,我摘取上述网站的重要演练,各位可以贴到stata的command视窗里,应当会有相当体悟
use
http://www.stata-press.com/data/r8/restaurant, clear
list family_id restaurant chosen kids rating distance in 1/14, sepby(fam) abbrev(10)
nlogitgen type = restaurant(1 2, 3 4 5, 6 7)
nlogittree restaurant type
gen incfast = (type == 1) * income
gen incfancy = (type == 3) * income
gen kidfast = (type == 1) * kids
gen kidfancy = (type == 3) * kids
clogit chosen cost rating distance incfast kidfast incfancy kidfancy, group(family_id)
estimates store fullset
clogit chosen cost rating distance incfast kidfast if type != 2, group(family_id)
hausman . fullset
祝 顺心 研安
我的回答难免有误,若有错,还请多包涵。