* * Example from section 6/5/2, pp 294-297 * open data bankdata.dat calendar(m) 1988:2 data(format=free,org=columns) 1988:2 1993:1 eom aaa govt34 * set deom = eom{-1}-eom set d34 = govt34{-1}-govt34 * seasonal seasons * set trend = t set trend2 = t**2 set trend3 = t**3 * * It turns out that this stepwise regression will end up picking the same model * used. (The .35 significance levels are roughly the ones that indicate whether * the addition or deletion of a variable will raise the R-bar squared). * stwise(method=stepwise,slstay=0.35,slenter=0.35) deom * 53 # constant aaa govt34 d34 seasons{-11 to -1} trend * * The simple static forecasts for a regression can be computed using the * instruction PRJ. The STDERRS option allows you to also compute the standard * errors of forecast. * prj(stderrs=stderrs) forecast 54 59 * * There seems to be an error in the forecast calculations in the text, since the * calculation on p. 296 uses .028 rather than .080 for the value of D(3-4). * print(picture="*.###") 54 59 deom forecast stderrs * graph(footer="Figure 6-9 Predictions for bank data") 2 # deom # forecast * set lower = forecast+%invnormal(.05)*stderrs set upper = forecast+%invnormal(.95)*stderrs graph(footer="Figure 6-9 Predictions for bank data",overlay=fan,ovcount=2,ovsame) 4 # deom # forecast # lower # upper