[程式] SAS industry & year fixed effect

看板Statistics作者 (Lowge)時間7年前 (2017/05/13 16:45), 編輯推噓1(105)
留言6則, 2人參與, 最新討論串1/1
[軟體程式類別]: SAS [程式問題]: 迴歸 [軟體熟悉度]: 新手 小弟需要在回歸中同時固定Industry fixed effect跟year fixed effect 嘗試寫了以下的回歸式: proc sort data=reg_bhar out=reg_bhar by year sic_code; run;; proc panel data=reg_bhar; id year sic_code; model bhar=relative_size cash diversity; run; 結果卻出現了以下的錯誤警告 Error: the data set work.reg_bhar is not sorted in ascending sequence with respect to the time series ID. The current time period has Sic_code=3613 and the previous time period has sic_code=3613 insection year=2010; 可是只排序Year的話一樣會出現問題 希望能請教該怎麼解決,是我使用錯誤的模型還是該在如何處理一下母資料,非常感謝! -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 1.162.49.231 ※ 文章網址: https://www.ptt.cc/bbs/Statistics/M.1494665106.A.951.html

05/13 17:06, , 1F
如果把proc panel 改成 proc surveyreg 跟CLASS
05/13 17:06, 1F

05/13 17:06, , 2F
可以達到控制Year & industry fixed effect 的效果嗎
05/13 17:06, 2F

05/13 18:39, , 3F
1你的樣本中出現 某家公司 只出現一個觀察值
05/13 18:39, 3F

05/13 18:40, , 4F
2. 使用proc surveyreg 可以解決
05/13 18:40, 4F

05/13 18:40, , 5F
3如果是新版的 proc autoreg更好用
05/13 18:40, 5F

05/13 20:40, , 6F
好的!非常感謝
05/13 20:40, 6F
文章代碼(AID): #1P5iUIbH (Statistics)