1 / 42

Forecasting Techniques: MA and Regression Methods

Forecasting Techniques: MA and Regression Methods. Lab for Su, Chapter 10. Three Summary Statistics. Mean Absolute Error (MAE) MAE = S |FE t | / n = S |F t - A t | / n Mean Square error (MSE) MSE = S (FE t ) 2 / n = S (F t - A t ) 2 / n Root Mean Square Error (RMSE)

mmarcus
Download Presentation

Forecasting Techniques: MA and Regression Methods

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Forecasting Techniques: MA and Regression Methods Lab for Su, Chapter 10

  2. Three Summary Statistics • Mean Absolute Error (MAE) MAE = S |FEt| / n = S |Ft - At| / n • Mean Square error (MSE) MSE = S (FEt)2 / n = S (Ft - At)2 / n • Root Mean Square Error (RMSE) RMSE = SQRT[S (FEt)2 / n = S (Ft - At)2 / n]

  3. Moving Average Methods • Provides more efficient mechanical projections of short-term movements • Has advantage of flexibility and presents a more realistic picture of long-run movements • Data are not forced into any particular patterns MA: X*t = (1/n)Sni=1Xt-i =(1/n)[Xt-1 +Xt-2 +Xt-3 + ...+Xt-n] • Note this is not a centered moving average • Must only decide on n • Can be applied to first differences or % changes

  4. Moving Average Example • Start with an MA(4) forecast • For ease of coding, copy the car sales values to the MA column, then the out of sample MA forecast can be easily written and copied • Compute the within sample, one period ahead MAE, MSE, RMSE

  5. Naïve Forecasts and MA(4)

  6. Changing the Order of an MA Forecast • Economists refer to MA forecasts by the number of periods they use, which is called the “order” of the moving average • MA(2): Two period moving average • MA(3): Three period moving average • etc. • The forecast depends on the MA order

  7. Effect of Changing Order

  8. Regression Models • Represent functional relationships between economic variables • Usually estimated by OLS techniques • General Form Yt = b0 + b1X1t + b2X2t + … + bkX1k + ut Yt : Dependent Variable Xit‘s : Explanitory Variables bi‘s: Parameters ut : Stochastic Term

  9. Example: Automobile Sales • Replicate the regression results in section 4 on page 348 • Use the regression data analysis tool • Model: Yt = a + bXt + ut • Y: Automobile Sales X: New Car Price • Linear Demand Curve

  10. Procedure • Step 1: Copy the sales and price data to a new worksheet • Step 2: Start the regression data analysis tool • Specify correct ranges

  11. Regression Output

  12. Interpreting Regression Results • Yt = 10,200.23 - 30.275Xt (10.20) • Parameter on X: -30.27 • t-statistic: 3.08

  13. Ex Post Point Forecasts • To make an ex post forecast for 1991, simply plug the actual value of the price index for 1991 into (10.20) - Put in D22 • Yt = 10,200.23 - 30.275(125.3) = 6,406.77 • Note that ex post forecasts can be done for any year in the period for which data are available

  14. Evaluation of Ex Post Forecasts • Can also evaluate forecasts within sample • Copy the formula from D22 into D21 • Where in the regression output can you find this number? • Fill in the rest of column D with the Ex Post Forecasts and plot the actual sales and the Ex Post forecasts

  15. Summary Statistics • Already know how to calculate, but in this case the regression function has already done some of the heavy lifting • We saw where the Ex Post forecasts could be found, what about the forecast errors?

  16. Residuals and Forecast Errors • In the terminology of econometrics, ex post forecast errors are called residuals • The OLS estimator is designed to minimize the sum of the residuals squared - OLS estimates minimize MSE and RMSE • To find value of MSE, look on the ANOVA table, for the row labeled Residual and under the column labeled SS

  17. Ex Ante Point Forecasts • To generate these, must forecast X, as these forecasts are conditional on unknown future values (must pretend that the present is 1991 in this case) • How should X be forecast?

  18. Ex Ante Point Forecasts: Example • Step 1: Extend the time column to 1994 • Step 2: Calculate the forecasted X’s using the same change naïve forecasting model in column C • Step 3: Using the formula from above, calculate the Ex Ante forecasts for 1992 - 1994 and chart them

  19. Interval Forecasts • Instead of a line, can also display the range in which the forecast values will probably fall • These are called interval forecasts and are based on the variance of the regression • Based on (10.18)

  20. Interval Forecasts: Example • Must calculate average of X and sum of X - average(X) = x • First term of (10.18) is just ex ante forecast • t0.025 is just a value from a table in a statistics book • se has already been calculated by the regression program • Text has wrong numbers

  21. Forecast Interval

  22. Autoregressive Models • Even though they use sophisticated statistical techniques, these models are extrapolations • The explanatory variables (X’s) are lagged values of the dependent variable • Assumes that the time path of a variable is self-generating • Also called the “Chain Principle”

  23. AR Models: Functional Forms • General: Xt = f(Xt-1,Xt-2,Xt-3,...,b1, b2,, b3...,ut) • ut : residual term, captures random components • Must specify form and lag length • Linear form, lag length k Xt = b0 + b1 Xt-1,+ b2Xt-2,+ …+ bkXt-k + ut Note that both No Change and Same Change naïve forecasts are special cases of this

  24. AR Models: Determining Lag Length • The general form has an infinite number of parameters, but we never have this much data - model must be restricted to be used • Assume that the impact of some distant Xt-j are trivial and insignificant • Rule of thumb: don’t use a k >4 because of econometric problems

  25. Replication Exercise • Replicate results on page 352 • Note different sample periods

  26. Exercise: AR Models • Data: U.S. Population 1948-1990 • Available in an Excel file on Web page (tab2-1.xls) • Step 1: Read file

  27. Exercise: Creating Lag Variables • Best way is with formulas, although could copy as well • Population data are in column 2 • Step 2: Label columns 3-6 “Lag1”, “Lag2”, “Lag3” and “Lag4” • What value goes in C3? D4? E5? F6?

  28. C3 is the Lag1 value for 1949, which is the actual population in 1948 - population lagged one year • D4 is the Lag2 value for 1950, which is the actual population in 1948 - population lagged two years • Step 3:Fill in rest of lags using formulas

  29. Exercise: AR Regressions • Step 4: Replicate the regression results on page 352. Note: Watch sample period • Step 5: Calculate Ex Post forecasts for the sample period and RMSE for each method • Which has the lowest RMSE? • Step 6: Calculate Ex Ante population forecasts through 2025 and compare to Table 10.4

  30. Dummy Variables • Requires no additional economic data • Was discussed in chapter 2 • Two Types: • Trend • Seasonal / annual

  31. Dummy Variables: Trends • Uses a time variable T (=1,2,3,…) and extrapolates X along its time path Linear: Xt = a + bTt Exponential: X = ea + bTt Reciprocal: X = 1/[a + bTt] Parabolic: X = b0 + b1 Tt,+ b2T2t

  32. Dummy Variables: Seasonal • These are “Intercept shifters” - they allow the intercept term b0 to vary systematically • Single Equation Model with Quarterly Dummies: Yt = g1Q1+g2Q2+g3Q3+g4Q4+b1X1t+…+bkX1k+ut • Can also use monthly dummies if Y is monthly • Get a different forecast for each quarter

  33. Other Dummy Variables • Dummy variables can be useful tools in forecasting • Recall from the earlier section that the single equation forecast for new car sales was high for 1991 because it was a recessionary year • Can use a dummy variable for recessions to improve this forecast

  34. Example: Recession Dummy • Model: Yt = a + bXt + gDR + ut • Y: Automobile Sales X: New Car Price • DR: Recession Dummy, = 1 in years with troughs • Add new sheet to spreadsheet, copy Year, New Car Sales, New Car Price • Look at Table 7.1, p. 236 to create dummy

  35. Empirical Results Yt = 10,699.87 - 31.66Xt - 1893.29DR (571.918) (6.233) (360.237)

  36. Forecast with Recession Dummy

  37. Forecast Comparison

  38. Exercise: Trend Forecasting • Step 1: Create trend and trend squared variables in the spreadsheet • Step 2: Replicate the three regression results shown on page 354 • Step 3: Calculate a 100 year ahead Ex Ante forecast of U.S. population using each, and chart the time paths • How accurate are these forecasts

More Related