怎么样把这个回归模型运用到其他数据集B上呢?
两个数据集的 列名设置为一样的,
但是,由于自变量比较多,不能手工输入,
所以请教一下大家~非常谢谢~

|
楼主: 夭妖
|
5758
14
【请教】SAS回归模型保存 |
|
已卖:4份资源 博士生 40%
-
|
回帖推荐soporaeternus 发表于7楼 查看完整内容 手上正好有代码,剥出来看看
&Var_Lst是所有变量的列表,用空格分开,不包括ID变量以及目标变量,例如%let Var_Lst=x1 x2 x3;
或者proc contents来获得
&Target 是目标变量 例如 %let Target=y;
Coefficient数据集包括回归模型结果的系数,并且变量名与B中相对应另外EM中的SCORE节点也可以,proc score也可以......
我习惯这样做了.....
简单线性回归+SAS9.1.3
data height;
input height;
datalines;
63
61
59
62
;
%macro reg(modelds=sashelp.class
,model=%str(weight=height)
,testds=height
,outds=result
,Yvar=weight
);
proc reg data=&modelds;
model &model;
ods output ParameterEstimates=para_est;
run;
quit;
data _null_;
set para_est;
call symputx(variab ...
本帖被以下文库推荐
| ||
|
|
| ||
| ||
| ||
|
Let them be hard, but never unjust
|
||
加好友,备注cda京ICP备16021002号-2 京B2-20170662号
京公网安备 11010802022788号
论坛法律顾问:王进律师
知识产权保护声明
免责及隐私声明


