[問題] IIA 的檢定(Limdep)

看板Statistics作者 (打球打球)時間16年前 (2008/04/14 23:31), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/2 (看更多)
不好意思想請問一下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
文章代碼(AID): #180tZJY7 (Statistics)
文章代碼(AID): #180tZJY7 (Statistics)