Chapter 27 Time Series Copyright © 2011 Pearson Education, Inc 27.1 Decomposing a Time Series Based on monthly shipments of computers and electronics in the US from 1992 through 2007, what would you forecast for the future? Use methods for modeling time series, including regression Remember that forecasts are always extrapolations in time of 55 Copyright © 2011 Pearson Education, Inc 27.1 Decomposing a Time Series The analysis of a time series begins with a timeplot, such as that of monthly shipments of computers and electronics shown below of 55 Copyright © 2011 Pearson Education, Inc 27.1 Decomposing a Time Series Forecast: a prediction of a future value of a time series that extrapolates historical patterns Components of a time series are: Trend: smooth, slow meandering pattern Seasonal: cyclical oscillations related to seasons Irregular: random variation of 55 Copyright © 2011 Pearson Education, Inc 27.1 Decomposing a Time Series Smoothing Smoothing: removing irregular and seasonal components of a time series to enhance the visibility of the trend Moving average: a weighted average of adjacent values of a time series; the more terms that are averaged, the smoother the estimate of the trend of 55 Copyright © 2011 Pearson Education, Inc 27.1 Decomposing a Time Series Smoothing Seasonally adjusted: removing the seasonal component of a time series Many government reported series are seasonally adjusted, for example, unemployment rates of 55 Copyright © 2011 Pearson Education, Inc 27.1 Decomposing a Time Series Smoothing: Monthly Shipments Example Red: 13 month moving average Green: seasonally adjusted of 55 Copyright © 2011 Pearson Education, Inc 27.1 Decomposing a Time Series Smoothing: Monthly Shipments Example Strong seasonal component (three-month cycle) of 55 Copyright © 2011 Pearson Education, Inc 27.1 Decomposing a Time Series Exponential Smoothing Exponentially weighted moving average (EWMA): a weighted average of past observations with geometrically declining weights EWMA can be written as s = (1 − w) y + ws t t t −1 Hence, the current smoothed value is the weighted average of the current observation and the prior smoothed value 10 of 55 Copyright © 2011 Pearson Education, Inc 4M Example 27.2: FORECASTING UNEMPLOYMENT Mechanics Estimate the model 41 of 55 Copyright © 2011 Pearson Education, Inc 4M Example 27.2: FORECASTING UNEMPLOYMENT Mechanics All conditions for the model are satisfied; proceed with inference Based on the F-statistic, reject H0 The model explains statistically significant variation The fitted equation is yˆ t = 0.086 + 0.794 yt −1 + 0.192 yt − + 0.164( yt −1 − yt −6 ) 42 of 55 Copyright © 2011 Pearson Education, Inc 4M Example 27.2: FORECASTING UNEMPLOYMENT Message A multiple regression fit to monthly unemployment data from 1980 through 2008 predicts that unemployment in January 2009 will be between 7.02% and 7.66%, with 95% probability Forecasts for February and March call for unemployment to rise further to 7.48% and 7.64%, respectively 43 of 55 Copyright © 2011 Pearson Education, Inc 4M Example 27.3: FORECASTING PROFITS Motivation Forecast Best Buy’s gross profits for 2008 Use their quarterly gross profits from 1995 to 2007 44 of 55 Copyright © 2011 Pearson Education, Inc 4M Example 27.3: FORECASTING PROFITS Method Best Buy’s profits have not only grown nonlinearly (faster and faster), but the growth is seasonal In addition, the variation in profits appears to be increasing with level Consequently, transform the data by calculating the percentage change from year to year Let yi denote these yearover-year percentage changes 45 of 55 Copyright © 2011 Pearson Education, Inc 4M Example 27.3: FORECASTING PROFITS Method Timeplot of year-over-year percentage change 46 of 55 Copyright © 2011 Pearson Education, Inc 4M Example 27.3: FORECASTING PROFITS Method Scatterplot of the year-over-year percentage change on its lag Indicates positive linear association Copyright © 2011 Pearson Education, Inc 47 of 55 4M Example 27.3: FORECASTING PROFITS Mechanics Estimate the model 48 of 55 Copyright © 2011 Pearson Education, Inc 4M Example 27.3: Mechanics FORECASTING PROFITS All conditions for the model are satisfied; proceed with inference The fitted equation has R2 = 71.0% with se = 7.37 The F-statistic shows that the model is statistically significant Individual t-statistics show that each slope is statistically significant 49 of 55 Copyright © 2011 Pearson Education, Inc 4M Example 27.3: FORECASTING PROFITS Mechanics Forecast for the first quarter of 2008: yˆ = 2.971 + 0.911(2.285) − 0.443(0.318) + 0.383(11 282) ≈ 9.345% However, with se = 7.4, the range of the 95% prediction interval includes zero It is [-6.5% to 25%] 50 of 55 Copyright © 2011 Pearson Education, Inc 4M Example 27.3: FORECASTING PROFITS Message The time series regression that describes year-over-year percentage changes in gross profits at Best Buy is significant and explains 70% of the historical variation It predicts profits in the first quarter of 2008 to grow about 9.3% over the previous year; however, the model can’t rule out a much larger increase (25%) or a drop (about 6.5%) 51 of 55 Copyright © 2011 Pearson Education, Inc Best Practices Provide a prediction interval for your forecast Find a leading indicator Use lags in plots so that you can see the autocorrelation 52 of 55 Copyright © 2011 Pearson Education, Inc Best Practices (Continued) Provide a reasonable planning horizon Enjoy finding dependence in the residuals of a model Check plots of residuals 53 of 55 Copyright © 2011 Pearson Education, Inc Pitfalls Don’t summarize a time series with a histogram unless you’re confident that the data don’t have a pattern Avoid polynomials with high powers Do not let the high R2 of a time series regression convince you that predictions from the regression will be accurate 54 of 55 Copyright © 2011 Pearson Education, Inc Pitfalls (Continued) Do not include explanatory variables that also have to be forecast Don’t assume that more data is better 55 of 55 Copyright © 2011 Pearson Education, Inc ... Copyright © 2011 Pearson Education, Inc 27. 2 Regression Models Forecasting an Autoregression For Feb 2008, there is no observed shipment for Jan 2008 Use forecast for Jan 2008: yˆ Feb.2008 = 0.9000... Education, Inc 27. 2 Regression Models Forecasting an Autoregression Example: Use AR(1) to forecast shipments yˆ t = 0.9000 + 0.9706 yt −1 For Jan 2008, use observed shipment for Dec 2007: yˆ... OF NEW CARS Use regression to model the trend and seasonal components apparent in the timeplot Use a polynomial for trend and three dummy variables for the four quarters Let Q1 = if quarter 1,