* * Numerical example from section 7.7 * pages 236-242 * * HS contains a single monthly series for the period 1959.01 to 1992.04. * cal(m) 1959:1 open data hs.asc data(format=prn,org=columns) 1959:1 1992:4 hs * graph(footer="Figure 7.4 Total New Private Housing Starts; NSA") # hs @dfunit(lags=4) hs @bjident(method=yule,number=36) hs * * With RATS, you indicate the ARIMA model using the AR, MA, SAR (seasonal AR) and * SMA (seasonal MA) parameters. sar=1 requests one seasonal AR parameter, which, * because this is monthly data, will be on lag 12. * boxjenk(constant,ar=1,sar=1,define=multar) hs * 1984:12 @RegCorrs(method=yule,number=36,footer="Correlogram of Residuals - Multiplicative Model") uforecast(equation=multar,stderrs=stderrs) forecast 1985:1 1992:4 set lower 1985:1 1992:4 = forecast-stderrs*1.96 set upper 1985:1 1992:4 = forecast+stderrs*1.96 graph(footer="Figure 7.5 Forecasts of Housing Starts") 4 # hs 1985:1 * # forecast # lower / 3 # upper / 3 * * The UFOREERRORS procedure analyzes the errors in a series of forecasts. Its * parameters are the actual series and the forecasts. * @uforeerrors hs forecast * * The Chow prediction test is based upon one-step forecasts, not the multiple * step forecast used above. These can be computed using the instruction steps. * The Chow test compares the mean squared error of the predictions to the * analogous estimate from the sample period. The prediction MSE is just the * square of the root mean square error. * uforecast(equation=multar,static) onestep 1985:1 1992:4 @uforeerrors hs onestep compute chowtest = (%%ferrmse**2)/%seesq cdf(title="Chow Prediction Test") ftest chowtest 88 %ndf * * Mixed multiplicative model * boxjenk(constant,ar=1,sar=1,ma=1,sma=1,define=multmixed) hs * 1984:12 @RegCorrs(method=yule,number=36,footer="Correlogram of Residuals - Mixed Model") uforecast(equation=multmixed,stderrs=stderrs) forecast 1985:1 1992:4 set lower 1985:1 1992:4 = forecast-stderrs*1.96 set upper 1985:1 1992:4 = forecast+stderrs*1.96 graph(footer="Figure 7.6 Forecasts of Housing Starts, Mixed Model") 4 # hs 1985:1 * # forecast # lower / 3 # upper / 3 * @uforeerrors hs forecast