@sasalex2024 wrote:
... If so, could you please tell me how I can obtain these residuals in their original, "unsorted" order? I also need to plot them over time.
Here is how to get the residuals in their original "unsorted" order. By the way ... if you are just interested in the residuals, then use the FORECAST statement with OUT= option. There's no need to get the residuals from the ResidualNormalityPanel (work.abc) dataset.
data work.have;
set sashelp.pricedata;
idobs=_N_;
run;
ods output ResidualNormalityPanel=work.abc;
proc arima data=work.have;
where region=1 AND line=1 and product=1;
identify var=sale crosscorr=(price discount);
estimate p=1 q=1 input=(price discount);
forecast lead=0 id=idobs interval=month out=work.xyz NOPRINT;
run;
QUIT;
PROC SQL noprint;
create table work.want as
select t1.* , t2.*
from work.xyz t1
, work.abc t2
where put(t1.residual,10.6) = put(t2.residual,10.6)
order by idobs;
QUIT;
/* end of program */
To plot a time series, see here :
Plotting Time Series Data - SAS Support Communities
Ciao, Koen
... View more