我写的如下:
proc glm data=aaa;
class year gics2;
model y = x1 x2 x3 x4 year gics2 /solution;
output out=bbb r=exy; 
run;
想要得到残差项,可是在程序编辑窗口,r不是蓝色的,表明不是输出项。这是怎么回事儿呢?
查询sas帮助文件里面的例子,有下面的程序,可以在glm输出r啊。
Examples[size=13.4399995803833px]The following statements show the syntax for creating an output data set with a single dependent variable.
proc glm;   class a b;   model y=a b a*b;   output out=new p=yhat r=resid stdr=eresid;run;
[size=13.4399995803833px]These statements create an output data set named new. In addition to all the variables from the original data set, new contains the variable yhat, with values that are predicted values of the dependent variable y; the variable resid, with values that are the residual values of y; and the variable eresid, with values that are the standard errors of the residuals.