480 likes | 566 Views
Lab Five Postscript. Econ 240 C. Airline Passengers. Pathologies of Non-Stationarity. Trend in variance Trend in mean seasonal. Fix-Up: Transformations. Natural logarithm First difference: (1-Z) Seasonal difference: (1-Z 12 ). Proposed Model. Autocorrelation Function
E N D
Lab Five Postscript Econ 240 C
Pathologies of Non-Stationarity • Trend in variance • Trend in mean • seasonal
Fix-Up: Transformations • Natural logarithm • First difference: (1-Z) • Seasonal difference: (1-Z12)
Proposed Model • Autocorrelation Function • Negative ACF(1) @ lag one • Negative ACF(12) @ lad twelve • Trial model SDDLNBJP c ma(1) ma(12) • Sddlnbjp(t) = c + resid(t) • Resid(t) = wn(t)– a1wn(t-1) – a12 wn(t-12)
Is this model satisfactory? • Diagnostics • Goodness of fit: how well does the model (fitted value) track the data (observed value)? Plot of actual Vs. fitted • Is there any structure left in the residual? Correlogram of the residual from the model. • Is the residual normal? Histogram of the residual.
Forecasting Seasonal Difference in the Fractional Change • Estimation period: 1949.01 – 1960.12 • Forecast period: 1961.01 – 1961.12
Eviews plot of forecast plus or minus two standard errors Of the forecast
Eviews spreadsheet view of the forecast and the standard Error of the forecast
Using the Quick Menu and the show command to create Your own plot or display of the forecast
Note: EViews sets the forecast variable equal to the observed Value for 1949.01-1960.12.
To Differentiate the Forecast from the observed variable …. • In the spread sheet window, click on edit, and copy the forecast values for 1961.01-1961.12 to a new column and paste. Label this column forecast.
Note: EViews sets the forecast variable equal to the observed Value for 1949.01-1960.12.
Displaying the Forecast • Now you are ready to use the Quick menu and the show command to make a more pleasing display of the data, the forecast, and its approximate 95% confidence interval.
Recoloring • The seasonal difference of the fractional change in airline passengers may be appropriately pre-whitened for Box-Jenkins modeling, but it is hardly a cognitive or intuitive mode for understanding the data.Fortunately, the transformation process is reversible and we recolor, I.e put back the structure we removed with the transformations by using the definitions of the transformations themselves
Recoloring • Summation or integration is the opposite of differencing. • The definition of the first difference is: (1-Z) x(t) = x(t) –x(t-1) • But if we know x(t-1) at time t-1, and we have a forecast for (1-Z) x(t), then we can rearrange the differencing equation and do summation to calculate x(t): x(t) = x0(t-1) + Et-1 (1-Z) x(t) • This process can be executed on Eviews by using the Generate command
Recoloring • In the case of airline passengers, it is easier to undo the first difference first and then undo the seasonal difference. For this purpose, it is easier to take the transformations in the order, natural log, seasonal difference, first difference • Note: (1-Z)(1-Z12)lnBJPASS(t) = (1-Z12)(1-Z)lnBJPASS(t), I.e the ordering of differencing does not matter
Correlogram of Seasonal Difference in log of passengers. Note there is still structure, decay in the ACF, requiring A first difference to further prewhiten
As advertised, either order of differencing results in the Same pre-whitened variable
Using Eviews to Recolor • DSDlnBJP(t) = SDlnBJPASS(t) – SDBJPASS(t-1) • DSDlnBJP(1961.01) = SDlnBJPASS(1961.01) – SDlnBJPASS(1960.12) • So we can rearrange to calculate forecast values of SDlnBJPASS from the forecasts for DSDlnBJP • SDlnBJPASSF(1961.01) = DSDlnBJPF(1961.01) + SDlnBJPASS(1960.12) • We can use this formula in iterative fashion as SDlnBJPASSF(1961.01) = DSDlnBJPF(1961.01) + SDlnBJPASSF(1960.12), but we need an initial value for SDlnBJPASSF(1960.12) since this is the last time period before forecasting.
The initial value • This problem is easily solved by generating SDlnBJPASSF(1960.12) = SDlnBJPASS(1960.12)
Recoloring: Generating the forecast of the seasonal difference in lnBJPASS
Recoloring to Undo the Seasonal Difference in the Log of Passengers • Use the definition: SDlnBJPASS(t) = lnBJPASS(t) – lnBJPASS(t-12), • Rearranging and putting in terms of the forecasts lnBJPASSF(1961.01) = lnBJPASS(1960.12) + SDlnBJPASSF(1961.01) • In this case we do not need to worry about initial values in the iteration because we are going back twelve months and adding the forecast for the seasonal difference
The Harder Part is Over • Once the difference and the seasonal difference have been undone by summation, the rest requires less attention to detail, plus double checking, to make sure your commands to Eviews were correct.
The Last Step • To convert the forecast of lnBJPASS to the forecast of BJPASS use the inverse of the logarithmic transformation, namely the exponential