This action might not be possible to undo. Are you sure you want to continue?

**1. The problem of spurious regression.
**

Statisticians working with time series data uncovered a serious problem with standard

econometric techniques applied to time series. Estimation of parameters of the OLS

model produces statistically significant results between time series that contain a

trend and are otherwise random. This finding let to considerable work on the how to

determine what properties a time series must possess if econometric techniques are to

be used. The basic conclusion was that any times series used in econometric

applications must be stationary.

2. Determining the properties of a series.

a. Graphing the series

It is good practice to produce a plot of the time series you are investigating. Does the

series appear to have a stable mean or a trend? Does the variance of the series appear

to be constant over time?

Example: presidential approval.

20

Presidential Approval

40

60

80

scatter approval qtr, c(l)

1947q3

1960q1

1972q3

Quarter

1985q1

1997q3

then the series is stationary.approval | Coef.0006 0. t P>|t| [95% Conf. μ.90 0.0711 5.zt-1 = μ + (λ−1)zt-1+ βT + εt We can use OLS to estimate the parameters of this equation.approval t Source | SS df MS -------------+-----------------------------Model | 547.813897 2 273.9788 -----------------------------------------------------------------------------D.7465323 -------------+-----------------------------Total | 6696. How can you know if a series is stationary? (ii) The Dickey Fuller test A time series is describes as random walk if zt is a function of zt-1+εt.000 -. which implies that the best guess of zt+1 is zt and that the forecast error associated with zt+1 is σ.4840084 Number of obs = F( 2.66 0. This is designated a random walk with a drift. εt may have mean of zero and variance of σ2. Notice the short hand for lags and differences in STATA. εt may have be accompanied by a constant. Std.1642488 .906949 Residual | 6148. If the mean and variance change. 172) Prob > F R-squared Adj R-squared Root MSE = = = = = 175 7.042101 -3.0811475 . Interval] -------------+---------------------------------------------------------------approval | L1 | -. Err.0818 0. Rather than depending upon zt-1.24735 -.40356 172 35. We could describe each of these processes in a single equation zt = λzt-1+ μ + βT + εt Or zt .constant over time? If the mean and variance are constant over time. Describing the series (i) Stationary versus Nonstationary time series Are the characteristics of a time series – the mean and variance . This is designated a trend-stationary process. which means that the best guess for zt+1 is zt+ μ.b.21746 174 38.variable indicates the first lag.approval l. zt may simply be a function of a deterministic trend zt is a function of βT and εt. then the series is nonstationary. d. Example: presidential approval reg d. l.variable indicates the first difference.

so the series is stationary . a series can be transformed from nonstationary to stationary by taking the first difference. A series that has stationary first differences is designated I(1).140 -----------------------------------------------------------------------------* MacKinnon approximate p-value for Z(t) = 0. Rather than using zt as a dependent variable.35 0. Identify the linear trend (regression z on t).178 -. regress reguests that the table be included.0328263 .000 -. regress trend Dickey-Fuller test for unit root Number of obs = 175 ---------. Subtract the predicted value from the original.t | -.869247 3.35 0. To automatically run this test in STATA.0328263 . trend indicates that the trend variable should be included. Std.000 4.0121 -----------------------------------------------------------------------------D. In many cases.0098681 -1.0061301 _cons | 10.440 -3. Transforming the series: detrending or creating a first difference? (ii) detrending – remove a linear trend.0098681 -1. . In the example above. Challenge (and why this is often not done): is it very useful to assume a linear trend? (ii) first–difference. The approval series is stationary.615999 15.615321 15.862827 3.0811475 _trend | -. Create a predicted value.59 0. dfuller approval. λ−1<0 If β>0 then the series contains a trend.0061301 _cons | 10. or integrated of order 0.015 -3.000 4. t P>|t| [95% Conf. One important difference between the standard OLS output and the dfuller command output is the calculation of the critical value from tables published by MacKinnon.approval | Coef.Interpolated Dickey-Fuller --------Test 1% Critical 5% Critical 10% Critical Statistic Value Value Value -----------------------------------------------------------------------------Z(t) -3. Notice that I use both the regress and trend options.91692 ------------------------------------------------------------------------------ c.042101 -3. Interval] -------------+---------------------------------------------------------------approval | L1 | -.26612 2. the dependent variable becomes zt-zt-1.178 -. We can conclude that the coefficient on approval t-1 is not zero.0133481 .1642488 . then the series is stationary.27947 2. Err.58 0. We can use the same test to make sure that all of the variables in order model are stationary.90 0.94294 ------------------------------------------------------------------------------ If λ−1=0 then the series is not stationary (the series contains what is called a unit root).901 -4. use the dfuller command. In the example above β=0 If β=0 and λ−1 is not zero. A series that is stationary without any transformation is designated as I(0).0133481 .24735 -. or integrated of order 1.

2902 9. reg approval mics Source | SS df MS -------------+-----------------------------Model | 7220.091941 0.2643 174 99. Model 2 (detrend).0000 0.0696798 8. If MICS falls from very high to high. t P>|t| [95% Conf. then presidential approval falls. When consumer sentiment is high. Levels of presidential approval are a function of changes in MICS. The technical prescription (difference) may or may not coincide with what you think happens substantively.32173 .211597 Number of obs F( 1.(iii) Carefully consider the substantive implications of these transformations.456008 . If MICS falls.298118 6. approval is high. then presidential approval falls. If there is no change in consumer sentiment (remains low). then you can proceed to OLS.5187602 -------------+-----------------------------Total | 24537. If MICS is increasing and remains increasing. then presidential approval falls.2943 0.71 0. The level of presidential approval is a function of the level of MICS. If the rate of increase of MICS falls (an observations is below trend).000 .7310608 _cons | 4.52 0.481 -7. the level of presidential approval does not change. Model 3 (first difference). Once you are confident the variables are stationary. Interval] -------------+---------------------------------------------------------------mics | . Presidential approval is a function of departure of MICS from a trend.76528 Residual | 17316.725493 16. 174) Prob > F R-squared Adj R-squared Root MSE = = = = = = 176 72.5935344 . then approval is expected to remain at the mean.9759 -----------------------------------------------------------------------------approval | Coef.76528 1 7220. Consider the presidential approval example. Std.0296 175 140.56 0. Err. Consider the implications of a positive link between presidential approval and economic conditions Model 1 (raw series).

0582 288.0000 || 38 0.0165 -0.83 0.52 0.2 0.0362 268.12 0.0000 || 36 0.0827 187.01 0.33 0. residual corrgram res1 -1 0 1 -1 0 1 LAG AC PAC Q Prob>Q [Autocorrelation] [Partial Autocor] ------------------------------------------------------------------------------1 0.0000 | |26 0.3 0.69 0.0000 | | 22 0.79 0.1130 0.0000 | | 9 0.74 0.0000 |-| 37 0.0777 288.0000 | | 20 0.0391 -0.0000 | | 29 0.1425 -0. t and t3? STATA permits use to visually inspect the level of correlation across error terms at each lag – the plot is labeled a correlogram.1642 0.0924 321.1878 0.26 0. Diagnosing high order autocorrelation.4673 -0.1722 -0.0580 -0.0425 313.1707 0.0576 337.0000 | | 25 -0.7 0.49 0.08 0.53 0.0000 -| -| 14 -0.0721 271.1569 294.0574 288.1248 272.0167 0.0000 | | 10 0.8108 0.0030 287.0000 -| | 15 -0.0000 || 35 0.0911 337.1 0.57 0. predict res1.1709 0.0318 250.0000 ||32 0.72 0.0242 270.0000 || 34 0.0000 |--| 4 0.1298 0.27 0.0260 -0.0391 301.0369 0.52 0.0484 -0.0952 0.09 0.26 0.1130 0.0490 307.3575 0.0000 | | 18 -0.2 0.0508 -0.0000 |-----|-----2 0.79 0.0174 -0.1003 271.1645 0.0398 0.0322 274.0542 -0.0413 0.0000 | | 17 -0.0000 |-| 6 0.1188 271.0360 288.0276 0.1327 279.0000 | | 24 -0.49 0.28 0.74 0.53 0.0675 289.0129 0.0453 288.0000 | | 40 0.1583 -0.0000 | | 30 0.8121 117.0053 288.0000 | | 28 0.0000 | | 21 0.4 0.78 0.0812 284.0994 0.0322 287.92 0.0000 || 7 0.09 0.0000 |---| 3 0.0131 -0.55 0.0719 287.3.0000 | |16 -0.0000 | | 8 0.0151 -0.1135 0.97 0. t and t-2.0269 227.0000 | | 31 0.0000 | | 12 -0.0588 0.0000 | | 13 -0.14 0.0085 -0.0388 335.38 0.0394 332.0359 263.0542 287.0673 289.0000 || 33 0.14 0.0837 291.2591 -0.0000 | | 11 -0.0000 | | 39 0.0000 | | 27 0.18 0.15 0. (a) Autocorrelation function or ACF What is the correlation between the values of the error term at t and t-1.0000 |-| 5 0.1532 327.0000 | | .0803 287.6248 -0.0783 0.0415 0.1616 286.0000 | | 19 0.1483 288.1687 -0.95 0.0000 | | 23 -0.

30383 Iteration 1: log likelihood = -555. then the error term should appear to be white noise.0000 -----------------------------------------------------------------------------| OPG approval | Coef.137865 3.11 0.18424 7.70576 ARIMA regression Sample: 1 to 176 Log likelihood = -555. Err. the Q test statistics is a function of the square of the correlation coefficients at each lag (for j lags) and the number of observations in the sample.7058 Number of obs Wald chi2(2) Prob > chi2 = = = 176 529.56 0. Estimation strategies: ARIMA models 1. STATA reports if the test is statistically significant.80467 Iteration 2: log likelihood = -555.7188 Iteration 3: log likelihood = -555. ar(1) (setting optimization to BHHH) Iteration 0: log likelihood = -558.0814409 4. If there is no serial correlation – at lag 1 or other lags – in our model.3900807 .70873 Iteration 4: log likelihood = -555.2304594 . Std. AR(1) – equivalent to prais wintsten (Assumes et=ρet-1+vt) arima approval mics.9503 Prob > chi2(40) = 0. where vt is mean zero and variance sigma2.70602 Iteration 6: log likelihood = -555.19428 36. Q= n (n+2 ) Σ (1/n-j) ρ2j wntestq res1 Portmanteau test for white noise --------------------------------------Portmanteau (Q) statistic = 337. There is a formal test for this implemented in STATA – the Ljung Box Q.1742 . then the autocorrelation function should be composed of ρ=0 for k>0.70576 Iteration 7: log likelihood = -555. This is described as a white noise process.000 .002 8.70662 (switching optimization to BFGS) Iteration 5: log likelihood = -555. Formally. z P>|z| [95% Conf. If the test is significant. Interval] -------------+---------------------------------------------------------------approval | mics | .79 0. then the residuals are correlated.549702 _cons | 22.(b) Q test If the error is strictly a product of random error (et=vt).0000 4.

124995 .8286119 .-------------+---------------------------------------------------------------ARMA | ar | L1 | .811915 ------------------------------------------------------------------------------ 3. arima approval mics. MA (1).65487 Iteration 3: log likelihood = -554.64684 6.64796 (switching optimization to BFGS) Iteration 5: log likelihood = -554.24089 Iteration 1: log likelihood = -554.6552478 _cons | 11. arima approval mics.000 .6351 = = = 176 188.73072 Iteration 3: log likelihood = -595.64873 Iteration 4: log likelihood = -554.7891 Iteration 1: log likelihood = -598. Std.64723 Iteration 4: log likelihood = -595.3504756 20.63556 Iteration 6: log likelihood = -595.83 0.64185 (switching optimization to BFGS) Iteration 5: log likelihood = -595.911241 -------------+---------------------------------------------------------------/sigma | 5.74565 Iteration 2: log likelihood = -554.64771 Iteration 7: log likelihood = -554.076 -1.186254 6. ma(1 4) ar(1 4) (setting optimization to BHHH) Iteration 0: log likelihood = -558.33 0.77 0.97 0.0421585 19.52233 -------------+---------------------------------------------------------------ARMA | ma | L1 | .63514 ARIMA regression Sample: 1 to 176 Number of obs Wald chi2(2) Prob > chi2 Log likelihood = -595.23 0.64771 ARIMA regression .000 5.64778 Iteration 6: log likelihood = -554.438076 7. Assumes et=θvt-1+vt .63516 Iteration 7: log likelihood = -595.99993 Iteration 2: log likelihood = -595.2467909 22.569249 1.3629438 .5090958 .5501471 .000 6. ma(1) (setting optimization to BHHH) Iteration 0: log likelihood = -614.0664946 10.810801 -------------+---------------------------------------------------------------/sigma | 7.153656 ------------------------------------------------------------------------------ 2.65 0.680474 .228655 24.000 .669955 .0745687 6. Err.7459827 . z P>|z| [95% Conf. MA (1) AR (1 4) .0000 -----------------------------------------------------------------------------| OPG approval | Coef. Interval] -------------+---------------------------------------------------------------approval | mics | .000 .74 0.

3720738 .1518659 ma | L1 | .6477 Number of obs Wald chi2(5) Prob > chi2 = = = 176 460.001 10.114837 Next week Dynamic models (including lagged values of X or Y in the model) Read Gujurati.888 -.000 .7803232 .09471 37. Std.646366 .0211127 .0000 -----------------------------------------------------------------------------| OPG approval | Coef.0683468 11.134136 .2163869 .41 0.68 0.9142804 L4 | .81 0.0971602 1.38 0.0101643 .155932 6.25 0. Chapter 16.5277607 _cons | 23.000 . Kennedy.1888511 -------------+---------------------------------------------------------------/sigma | 5.0855824 0.1315372 .2446229 23.30885 -------------+---------------------------------------------------------------ARMA | ar | L1 | .000 5.3245665 L4 | .0562946 .Sample: 1 to 176 Log likelihood = -554. Sections 1-5.635385 .072298 0.1466257 .04 0.805 -. z P>|z| [95% Conf.0794335 4.70178 6. Err. Chapter 18 .42 0.94251 3.167 -.14 0. Interval] -------------+---------------------------------------------------------------approval | mics | .

Report the results 3. If the value is high.no high order serial correlation --must be rejected. Estimate the model implied by your expectations with OLS. Is there still a problem with serial correlation? Repeat 4(a). We will again use Green et al data on presidential approval and macropartisanship. This week we both use a more general remedy and tackle new tests for stationarity and high order autcorrelation. Are the times series used in the analysis stationary? Note: the Dickey Fuller augmented test for a unit root determines if the series has a unit root.PLS 692. (An estimated p-value<0. Report and interpret the Ljung-Box Q test statistic for higher order serial correlation (the default is to test up to lag 40).) b. You can take the same approach with the data as in assignment #2 – model presidential approval as a function of other variables in the data set. Are there strong relationships between residuals at any lags? 5. then the null hypothesis . What is the link between presidential approval and the variables you include in the model? Describe your expectations 2. and 4(b) above . Produce and interpret the correlogram. Your assignment 1. Note: the statistical test is a Lagrange Multiplier test. Stationary series do not have a unit root. ARIMA models Last week we used a remedy for serial correlation that assumed the special case of "first order autoregressive" error. so you would observe a rejection of the null hypothesis (the absolute value of the test statistic is high) if the series is stationnary. (An estimated p-value<0. Specify and estimate an ARIMA model and compare the results to the simple OLS 6. Assignment Number 3.05 implies the series is stationary) 4.05 imples serial correlation. Is there a problem with serial correlation? a.

Sign up to vote on this title

UsefulNot useful- stata
- Stata Manual 2009
- Session0_Geo4990
- ARIMA Report
- Lecture 11 Vt13
- Building ARIMA Models
- ARIMA Time Series
- Auto Correlation
- Chapter Twenty.time Series
- Applied Econometrics
- Econometrics
- lecture12_08
- W1
- DFA&HURST
- Lec DiagTest 0902
- univariate time series.ppt
- Univariate Time Series
- Time Series
- Lect 1
- ARIMA Modelling
- TS Readings Required
- TIme Series Model
- ts
- syllec902-12-3
- Stationary and Non-stationary Time Series
- Time Series With SPSS
- The Box-Jenkins Methodology for RIMA Models
- Time Series
- 12 3 2010 Mitchel Slides
- Tabachnik Time Series Analysis
- stata cmds