* * Example 8/2/5 from pp 413-414 * open data adv_sale.dat data(format=free,org=columns) 1 36 sales adv * boxjenk(ma=1,maxl,constant,inputs=1,define=saleseq) sales / sresids # adv 1 1 0 * * MA(1) process estimates for adv * boxjenk(ma=1,maxl,constant,define=adveq) adv / aresids * * Because this requires that two equations be forecasted simultaneously, we can't * use the UFORECAST instruction, since that's just for univariate forecasts. * Instead, we group the two equations into a MODEL, and use the FORECAST * instruction. This produces a VECTOR of SERIES for the forecasts and another * one for the standard errors. Because the sales equation is the second one * listed in the group instruction, its forecasts and standard errors are * forecasts(2) and stderrs(2). * group tmodel adveq saleseq * forecast(model=tmodel,steps=5,results=forecasts,stderrs=stderrs) * set lower 37 41 = forecasts(2)+stderrs(2)*%invnormal(.025) set upper 37 41 = forecasts(2)+stderrs(2)*%invnormal(.975) * graph(footer="Figure 8-12 Forecasts of Sales Data",overlay=fan,ovcount=2,ovsame) 4 # sales # forecasts(2) # lower # upper