Download presentation
Presentation is loading. Please wait.
1
1 Lab Four Postscript Econ 240 C
2
2 Airline Passengers
3
3
4
4 Pathologies of Non-Stationarity Trend in variance Trend in variance Trend in mean Trend in mean seasonal seasonal
5
5 Fix-Up: Transformations Natural logarithm Natural logarithm First difference: (1-Z) First difference: (1-Z) Seasonal difference: (1-Z 12 ) Seasonal difference: (1-Z 12 )
6
6
7
7
8
8
9
9
10
10
11
11
12
12
13
13 Proposed Model Autocorrelation Function Autocorrelation Function Negative ACF(1) @ lag one Negative ACF(12) @ lad twelve Trial model SDDLNBJP c ma(1) ma(12) Trial model SDDLNBJP c ma(1) ma(12) Sddlnbjp(t) = c + resid(t) Resid(t) = wn(t)– a 1 wn(t-1) – a 12 wn(t-12)
14
14
15
15 Is this model satisfactory? Diagnostics 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.
16
16 Plot of actual, fitted, and residual
17
17 Correlogram of the residual from the model
18
18 Histogram of the residual
19
19 Forecasting Seasonal Difference in the Fractional Change Estimation period: 1949.01 – 1960.12 Estimation period: 1949.01 – 1960.12 Forecast period: 1961.01 – 1961.12 Forecast period: 1961.01 – 1961.12
20
20 Eviews forecast command window
21
21 Eviews plot of forecast plus or minus two standard errors Of the forecast
22
22 Eviews spreadsheet view of the forecast and the standard Error of the forecast
23
23 Using the Quick Menu and the show command to create Your own plot or display of the forecast
24
24
25
25 Note: EViews sets the forecast variable equal to the observed Value for 1949.01-1960.12.
26
26 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. 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.
27
27 Note: EViews sets the forecast variable equal to the observed Value for 1949.01-1960.12.
28
28 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. 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.
29
29 Qick menu, show command window
30
30
31
31 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 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
32
32 Recoloring Summation or integration is the opposite of differencing. Summation or integration is the opposite of differencing. The definition of the first difference is: (1-Z) x(t) = x(t) –x(t-1) 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) = x 0 (t-1) + E t-1 (1-Z) x(t) 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) = x 0 (t-1) + E t-1 (1-Z) x(t) This process can be executed on Eviews by using the Generate command This process can be executed on Eviews by using the Generate command
33
33 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 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-Z 12 )lnBJPASS(t) = (1- Z 12 )(1-Z)lnBJPASS(t), I.e the ordering of differencing does not matter Note: (1-Z)(1-Z 12 )lnBJPASS(t) = (1- Z 12 )(1-Z)lnBJPASS(t), I.e the ordering of differencing does not matter
34
34
35
35 Correlogram of Seasonal Difference in log of passengers. Note there is still structure, decay in the ACF, requiring A first difference to further prewhiten
36
36 As advertised, either order of differencing results in the Same pre-whitened variable
37
37 Using Eviews to Recolor DSDlnBJP(t) = SDlnBJPASS(t) – SDBJPASS(t-1) DSDlnBJP(t) = SDlnBJPASS(t) – SDBJPASS(t-1) DSDlnBJP(1961.01) = SDlnBJPASS(1961.01) – SDlnBJPASS(1960.12) DSDlnBJP(1961.01) = SDlnBJPASS(1961.01) – SDlnBJPASS(1960.12) So we can rearrange to calculate forecast values of SDlnBJPASS from the forecasts for DSDlnBJP So we can rearrange to calculate forecast values of SDlnBJPASS from the forecasts for DSDlnBJP SDlnBJPASSF(1961.01) = DSDlnBJPF(1961.01) + SDlnBJPASS(1960.12) 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. 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.
38
38 The initial value This problem is easily solved by generating SDlnBJPASSF(1960.12) = SDlnBJPASS(1960.12) This problem is easily solved by generating SDlnBJPASSF(1960.12) = SDlnBJPASS(1960.12)
39
39 Recoloring: Generating the forecast of the seasonal difference in lnBJPASS
40
40
41
41 Recoloring to Undo the Seasonal Difference in the Log of Passengers Use the definition: SDlnBJPASS(t) = lnBJPASS(t) – lnBJPASS(t-12), 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) 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 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
42
42
43
43
44
44 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. 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.
45
45
46
46 The Last Step To convert the forecast of lnBJPASS to the forecast of BJPASS use the inverse of the logarithmic transformation, namely the exponential To convert the forecast of lnBJPASS to the forecast of BJPASS use the inverse of the logarithmic transformation, namely the exponential
47
47
48
48
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.