我有数据集A,想对里面的公司按照每一年度做回归分析后提取残差,这些残差要作为另外一个模型的变量,SAS新手,刚接触SAS没多久,求高手帮忙写code,谢谢~!
年度变量名:year;
公司变量名:ID;
万分感谢!
|
楼主: pch0909
|
2052
2
[SAS] SAS按年度和企业回归提取残差 |
|
初中生 66%
-
|
回帖推荐dogmamongo 发表于2楼 查看完整内容 proc sort dats=yourfile;by year;
run;
proc reg data=yourfile noprint;
model y=x;
by year;
output out=newfile r=res;
quit;
newfile 中的res就是你要的
模型自己修
| ||
|
|
| ||
京ICP备16021002号-2 京B2-20170662号
京公网安备 11010802022788号
论坛法律顾问:王进律师
知识产权保护声明
免责及隐私声明
用户协议


