输出R方数据到newdata,SAS程序:
ods listing close; ods html close;ods graphics off;
ods output FitStatistics=newdata;
proc reg data=data1;
model y=x;
by dm;
run;
quit;
ods output AdditionalEstimates=pin;
data newdata;
set newdata;
by dm;
if not first.dm then delete;
keep dm nvalue2;rename nvalue2=Rsquare;
run;