以下只是我个人的一些思路,希望高手能够指教一下!
Proc sql;
Create table newdata (drop=_1-_100) as
Select *, pre+_1 as y1,
pre+_2 as y2,
………
pre+_100 as y100,
From originaldata;
Quit;
怎么能把这个100步,用loop或宏语句表示呢?
Proc reg data=newdata;
Model y1=x1 x2 x3 x4
By co;
Run;
……….
Proc reg data=newdata;
Model y100=x1 x2 x3 x4;
By co;
Run;
这里也涉及到怎么用loop或宏语句表示.还有如何把我要的每家公司的每次sample的intercept, t value of intercept显示出来?用ods语句?
Data pvalue;
Count=0;
Numiters=100;
If t_new>t_obs then count=count+1;
End;
p_value=count/numiters;
Run;
用这个语句能够计算出我所要的p-value吗?