為什麼這篇Dummy variable SAS鄉民發文收入到精華區:因為在Dummy variable SAS這個討論話題中,有許多相關的文章在討論,這篇最有參考價值!作者tew (咖啡王子)站內Statistics標題Re: [問題] SAS設置dummy vari...
我是不清楚你要做的研究
但是 我想說的是 你的虛擬變數是否有必要設定 XDD
如果只是跑有固定效果的regression
proc tscsreg;
id time ; (公司變數)
model y=x1-xn;
run;
這樣子跑出來
就會跟
proc reg;
model y=x1-xn d1-dt;
quit;
一模一樣
手邊無SAS
我只能就記憶提示一下
要設兩千多個虛擬變項 我基本上不會想設虛擬變項
我想你的目的也不是設虛擬變項
所以就推薦你專研一下
proc tscsreg這個語法
拙見 僅供參考
※ 引述《ivan1215 (米糕)》之銘言:
: 各位前輩好
: 我現在遇到設置dummy variable 的問題
: 因為我的data 內總共有一百多萬筆資料 實際天數約2000天 公司有八百多家
: 我現在要依照日期來設至dummy variable
: if date=20010102 then d1=1 ;else d1=0;
: if date=20010103 then d2=1 ;else d2=0;
: ......
: ......
: ......
: if date=20091231 then d1989=1 ;else d1989=0;
: 不知道有沒有辦法將這將近兩千條式子縮短
: 希望各位前輩可以幫幫忙 感謝<(_ _)>
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.231.231.138