names a new variable to contain the residual values for the response variable. The RESIDUAL= option can be abbreviated as RESID= or R=.
For example, the following statements create an output data set named B. In addition to the variables in the input data set, the data set B contains the variable YHAT, with values that are predicted values of the response variable Y, and the YRESID, with values that are the residual values of Y.
proc syslin data=a out=b;
model y = x1 x2;
output p=yhat r=yresid;
run;
For example, the following statements create an output data set named PRED. In addition to the variables in the input data set, the data set PRED contains the variables Q_DEMAND and Q_SUPPLY, with values that are predicted values of the response variable Q for the demand and supply equations, respectively, and the variables R_DEMAND and R_SUPPLY, with values that are the residual values of the demand and supply equations, respectively.
proc syslin data=in out=pred;
demand: model q = p y s;
output p=q_demand r=r_demand;
supply: model q = p u;
output p=q_supply r=r_supply;
run;
For more information, see the section OUT= Data Set.