1 / 33

DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos

DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos. Lecture 9: Estimation & Diagnostic Checking in Box-Jenkins Models (Ch. 10, Part II). Material based on: Bowerman-O’Connell-Koehler, Brooks/Cole. Homework in Textbook. Page 480

justis
Download Presentation

DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos

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. DSCI 5340: Predictive Modeling and Business ForecastingSpring 2013 – Dr. Nick Evangelopoulos Lecture 9: Estimation & Diagnostic Checking in Box-Jenkins Models (Ch. 10, Part II) Material based on: Bowerman-O’Connell-Koehler, Brooks/Cole

  2. Homework in Textbook Page 480 Ex 10.1 through 10.6

  3. EX 10.1 Page 480 Stationary condition for AR(1): |f(1)| < 1. Note that .6591 < 1.

  4. EX 10.2 Page 480 Stationary condition for AR(1): |f(1)| < 1. Note that .64774 < 1.

  5. EX 10.3 Page 480 P-values for MU and AR1,1 are < .0001. Note there is no p-value for the constant term. Conclusion: both d and f1 should be retained since they are significant.

  6. EX 10.4 Page 480 • n’ = n – d = 90 – 1 = 89; • Q* = (89)*(89+2)*( (1/(89-1))*(.104)^2 + (1/(89-2))*(-.202)^2 + (1/(89-3))*(-.022)^2 + (1/(89-4))*(.024)^2 + (1/(89-5))*(.064)^2 +(1/(89-6))*(.168)^2 ) )= 8.04 (Note SAS computes 8.02) • Chi-square (df= 6-1 = 5, a = .05) = 11.0705 • Fail to Reject Model is adequate since Q*< 11.07. NOTE nc = 1 for SAS since it does not count d.

  7. EX 10.5 Page 480 • n’ = n – d = 90 – 1 = 89; Use K = 12 and Minitab rl • Q* = (89)*(89+2)*( (1/(89-1))*(.09)^2 + (1/(89-2))*(-.21)^2 + (1/(89-3))*(-.02)^2 + (1/(89-4))*(.03)^2 + (1/(89-5))*(.05)^2 +(1/(89-6))*(.17)^2 + (1/(89-7))*(.03)^2 + (1/(89-8))*(-.01)^2 + (1/(89-9))*(-.06)^2 + (1/(89-10))*(-.01)^2 + (1/(89-11))* (-.01)^2 +(1/(89-12))*(.06)^2 ) = 8.9 (Same as MINITAB) • Chi-square (df= 12-2 = 10, a = .05) = 16.9109 • Fail to Reject Model is adequate since Q*< 16.91 NOTE nc = 2 for MINITAB since it does count d. • nc = 2.

  8. EX 10.6 Page 480 • 99% prediction interval for y91. • Note n = 90. t = 1. np = 2. n-np = 90-2 = 88. Use df=inf. • From Excel t(df = 88, .005) = 2.8795 • y(n+1)hat +/- t(df=n-np, a/2 =.005)*SE(n+1, n) • 1039.7086 +/- 2.8795*2.7975 • (1031.6532 to 1047.764) is 99% PI for 91st time period.

  9. The condition for stationarity of a general AR(p) model is that the roots of the characteristic function all lie outside the unit circle Stationarity of an AR process • Example 1: Is yt= yt-1 + ut stationary? The characteristic equation is 1 – z = 0, which has a root equal to 1, so it is a unit root process (so non-stationary)

  10. Invertibility of a MA process zt can be expressed as an infinite series of past z-observations. However, if the coefficients (weights) do not decline fast enough then the model will be unstable. We call such a model non-invertible. Invertibility implies that recent observations count more heavily than distant past observations.

  11. Review: Conditions for Stationarity and Invertibility

  12. Necessary conditions for Stationarity and Invertibility • If the model includes autoregressive parameters: • Stationarity Condition: The sum of values of the autoregressive parameters (ϕi) should be less than 1 • InvertibilityCondition: None • If the model includes moving average parameters: • InvertibilityCondition: The sum of values of the moving average parameters (θi) should be less than 1 • StationarityCondition: None

  13. A first order moving average has an autocorrelation of .5. What is the coefficient for the moving average model? Is the model stationary? Is the model invertible? MA model Stationarity and Invertibility • r = .5; .5 = -q1/(1 + q12); This implies • .5q12 + q1 + .5 = 0; Use quadratic formula • (-b +/- Sqrt(b2 -4ac)) / (2a) for ax2 +bx + c = 0 • q1 = (-1 +/- Sqrt(12 – 4(.5)(.5)))/(2(.5)) • q1 = (-1 +/- Sqrt(1 –1))/(1)) • q1 = 1; Model is stationary; But not invertible since |q1| < 1 does not hold. Look at Page 437

  14. What is the first and second order autocorrelation for the MA model Zt = .5 + at -.2at-1 - .1at-2? MA model autocorrelation • Note q1 = .2 and q2 = .1; • r1= (-.2)(1-(.1))/(1 + (.2)2 + (.1)2) • r1= (-.2)(.9)/(1.05) = -.17143 • r2= (-.1)/(1 + (.2)2 + (.1)2) • r2= -.09524 Look at Page 437

  15. If the second order autocorrelation of a first order autoregressive model is .25, what is the coefficient of the zt-1 term? AR model autocorrelation • Given (f1)2 = .25 implies f1 = +/-.5 Look at Page 437

  16. For the model, Zt = .5 + .2zt-1 - .3 zt-2 + at, what are the values of the first four autocorrelations? AR model autocorrelations • r1 = (.2)/(1-(-.3)) = .2/1.3 = .1538 • r2 = (.2)2/(1-(-.3)) + (-.3) = .04/1.3 + (-.3) = -.2692 • r3 = (.2)r2 + (-.3)r1 = (.2 )*(-.2692)+(-.3)*(.1538) • r3 = -.09998 • r4 = (.2)r3 + (-.3)r2 = (.2)*(-.09998)+(-.3)*(-.2692) • r4 = .06076 f1 = .2 and f2 = -.3 Look at Page 437

  17. Is the model Zt = .5 + at -.6at-1 - .4at-2 stationary? Invertible? MA model Stationarity and Invertibility • Moving Average models are always stationary. Need to check for invertibility. • q1 = 0.6 and q2 = 0.4 • Note: 0.6 + 0.4 =1 (not < 1). 0.4 - 0.6 < 1 and |.4| < 1. • Therefore, model is Not Invertible.

  18. Seven (7) Error Measures • Mean (Average) Error (ME) = the average of the error for each period • Mean Absolute Deviation (MAD) = the average of the absolute values of the error for each period • Mean Squared Error (MSE) = the average of the squared error for each period • Standard Deviation (SD) = the square root of the MSE

  19. 7 Error Measures (cont’d) • Signed Squared Error (SSE) = the average of the squared error with the signed retained of the direction of the error • Mean Percentage Error (MPE) = the average of the percentage error for each period. The percentage is calculated by dividing the error by the actual sales. • Mean Absolute Percentage Error (MAPE) = the average of the absolute value of the percentage error for each period. The percentage is calculated by dividing the error by the actual sales.

  20. Theil’s U-Statistic • This measure takes the ratio of the MPE (mean percentage error) to what the MPE would be if using the naïve method of letting the last actual value be the next forecast.

  21. Performance of a model is measured by Theil’s U. The Theil's U statistic should fall between 0 and1. When U=0,that means that the predictive performance of the model is excellent and when U=1 then it means that the forecasting performance is not better than just using the last actual observation as a forecast.

  22. Theil’s U and RMSE • The difference between RMSE (or MAD or MAPE) and Theil’s U is that the formers are measure of ‘fit’; measuring how well model fits to the historical data. • The Theil'sUon the other hand measures how well the model predicts against a ‘naive’ model. A forecast in a naive model is done by repeating the most recent value of the variable as the next forecasted value.

  23. Interpretation of Theil’s U • Theil’s U determins the forecasting performance of the model. • The interpretation in daily language is as follows: • Interpret (1- Theil’sU) • 1.00 – 0.80 High (strong) forecasting power • 0.80 – 0.60 Moderately high forecasting power • 0.60 – 0.40 Moderate forecasting power • 0.40 – 0.20 Weak forecasting power • 0.20 – 0.00 Very weak forecasting power

  24. What is White Noise? • This is a purely random process, a sequence of independent and identically distributed random variables • Has constant mean and variance • So Zt is white noise if (r is correlation):

  25. Random walk • Start with {Zt} being white noise or purely random • {Xt} is a random walk if

  26. Random walk • The random walk is not stationary • First differences are stationary

  27. Notation - Autoregressive processes • The first order autoregression is Xt = Xt - 1 + Zt (Note Zt is equivalent to et here.) • Provided ||<1 it may be written as an infinite order MA process • Using the backshift operator we have (1 – B)Xt = Zt

  28. Autoregressive processes From the previous equation we have

  29. ARIMA(0,1,1) with constant = simple exponential smoothing with growth • By implementing the SES model as an ARIMA model, you actually gain some flexibility. First of all, the estimated MA(1) coefficient is allowed to be negative: this corresponds to a smoothing factor larger than 1 in an SES model, which is usually not allowed by the SES model-fitting procedure. Second, you have the option of including a constant term in the ARIMA model if you wish, in order to estimate an average non-zero trend. The ARIMA(0,1,1) model with constant has the prediction equation: • The one-period-ahead forecasts from this model are qualitatively similar to those of the SES model, except that the trajectory of the long-term forecasts is typically a sloping line (whose slope is equal to mu) rather than a horizontal line.

  30. Exponential smoothing in ARIMA • Simple exponential smoothing is the optimal method of fitting the ARIMA (0, 1, 1) process (=MA(1) on the first differences) • Optimality is obtained by taking the smoothing parameter  to be 1 –  when the model is

  31. Equivalence Without Notation

  32. Equivalence of Holt’s Trend Corrected Exponential Smoothing and Box Jenkins

  33. Homework in Textbook Page 484-485 Ex 10.7 through 10.12

More Related