I tried to use the Inpulse Respoonse Function of the model to get the mentioned forecast intervals: Each random shock is independent, so I can add the variance (sigma**2) weighted by the IRF. Then take the square root. This is also how the simple forecast intervals (Standard Errors) are calculated. Now I only need to be careful with the linear combination. For example the effect of the random shock at lead(2) - remember, we are calculating std error for lead(7) – is: 0.5*irf(0) + irf(5) Anybody can see a theoretical error in this approach? PROC VARMAX can be used, to get the IRF. Here's a code: proc varmax data=sashelp.citimon; model CCIUAC / dif(CCIUAC(1)) q=1 p=4 /*6*/ method=ml print=(impulse=(simple accum )) lagmax=6 ; output out=vforecast lead=12; run; data _null_; sigma=sqrt(586153.48852); /* number copied here from the output of VARMAX*/ array irf[0:7] (1, 0.33369, 0.29371, 0.46347, 0.23512, 0.21355, 0.22610, 0.14592);/*Impulse Response - numbers copied here from the output of VARMAX*/ array airf[0:7];/*Accumulated Impulse Response*/ airf[0]=1; do i=1 to 7; airf=airf[i-1]+irf;end;/*calculating airf from irf*/ /*Calculating StdErr for forecast lead 2*/ do i=0 to 1; std_2+airf**2; end; std_2=sqrt(std_2)*sigma; /*Calculating StdErr for forecast lead 7*/ do i=0 to 6; std_7+airf**2; end; std_7=sqrt(std_7)*sigma; /*Calculating StdErr for the linear combination*/ /*It is similar to a convolution operator, but you sum the squares*/ do i=0 to 6; if 0<=i<=4 then do;/**/ lincomb+airf**2; end; else do;/*5 and 6*/ lincomb+(airf+0.5*airf[i-5])**2; end; end; lincomb=sqrt(lincomb)*sigma; putlog sigma= std_2= std_7= lincomb=; run; Perhaps SAS/IML can do this with less coding. Thx
... View more