作者Surain (打球打球)
看板Statistics
标题[问题] IIA 的检定(Limdep)
时间Mon Apr 14 23:31:29 2008
不好意思想请问一下Limdep中想要做IIA test的问题
问题主要如下:
因为我的attribute(indep var)不会随choices改变而改变
所以做IIA test时无法直接用Ias的指令
并须分别列出matrix去计算
手册上的模型:
mode(dependent var)
air 0
train 0
bus 1
car 1
air 0
train 0
bus 0
car 0
air 0
train 0
bus 0
car 1
.
.
.
手册上教的程式(黄色的是说明 红色的程式):
? Fit original model using entire sample,retrieve results
NLGOIT ; Lhs=mode
; Cjoices=air,train,bus,car
; Rhs=invc,invt,gc,ttme,one $
Matrix ; bu=b(1:4); vu=varb(1:4,1:4) $
?Variable takes values 1,2,3,4,1,2,3,4...indicates indexing scheme for choices
Create ; Choice=Trn(-4,0) $
?Chair is dummy variable=1 for all four rows when choice made is air
?Now restrict sample to observations for choices train,bus,car
REJECT ; chair=1 | choice=1 $
?Fit model with restricted sample(choice set) and one less constant term
NLGOIT ; Lhs=mode
; Cjoices=train,bus,car
; Rhs=invc,invt,gc,ttme,one $
?Retrieve restricted results and compute Hausman statistic
MATRIX ; br=b(1:4); vr=varb(1:4,1:4)
; db=br-bu; vdb=Nvsm(vr,-vu) $
CALC ; List; q=Qfr(db,vdb); 1-chi(q,4)$
?Chair is dummy variable=1 for all four rows when choice made is air
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
这一行下面应该要有一列程式
可是好像手册里面没有印到= =
所以想请问一下要怎麽做
或是
原本有x,y两变数下
要另外设一个新的dummy z=1 under x=1,y=2的条件下
请问一下要怎麽设定
目前我只会under一个条件下的情况
感谢
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 61.228.44.204