[問題] IIA 的檢定(Limdep)
不好意思想請問一下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
討論串 (同標題文章)
以下文章回應了本文:
完整討論串 (本文為第 1 之 2 篇):