Attribution Non-Commercial (BY-NC)

95 views

Attribution Non-Commercial (BY-NC)

- stata
- Stata
- STATA
- Stata Manual 2009
- DickeyFullerTestUsingSPSS.docx(1).pdf
- Governance Infrastructure and Location of Foreign Direct Investment in the People’s Republic of China
- ADF Test
- Nonlinear_time_series_analysis.pdf
- Signal Extraction for Nonstationary Multivariate Time Series
- IJAIEM-2013-09-30-088.pdf
- Stata 02 04timeseriesanalysis 120605154536 Phpapp02
- Price Forecasting using Artificial Neural Network
- Acteduk Ct6 Hand Qho v04
- Introduction to SAS Enterprise Guide 4.1 for Statistical Analysis
- Spectrum Estimation Traditional Methods
- FIAR, An R Package for Analyzing Functional Integration in the Brain
- STA457
- Combining Probability Forecasts (Michael P. Clementsa David I. Harvey - 2010)
- 11 a Field Study of the Impact of a Performance-Based Incentive (1)
- Time.series.regression

You are on page 1of 9

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.

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?

80

Presidential Approval

40 20 60

Quarter

b. Describing the series

Are the characteristics of a time series – the mean and variance - constant over time?

If the mean and variance are constant over time, then the series is stationary. If the

mean and variance change, then the series is nonstationary. How can you know if a

series is stationary?

εt may have mean of zero and variance of σ2, which implies that the best guess of zt+1

is zt and that the forecast error associated with zt+1 is σ.

εt may have be accompanied by a constant, μ, which means that the best guess for zt+1

is zt+ μ. This is designated a random walk with a drift.

Rather than depending upon zt-1, zt may simply be a function of a deterministic trend

zt is a function of βT and εt. This is designated a trend-stationary process.

zt = λzt-1+ μ + βT + εt

Or

zt - zt-1 = μ + (λ−1)zt-1+ βT + εt

We can use OLS to estimate the parameters of this equation. Notice the short hand

for lags and differences in STATA. d.variable indicates the first difference. l.variable

indicates the first lag.

Source | SS df MS Number of obs = 175

Model | 547.813897 2 273.906949 Prob > F = 0.0006

Residual | 6148.40356 172 35.7465323 R-squared = 0.0818

-------------+------------------------------ Adj R-squared = 0.0711

Total | 6696.21746 174 38.4840084 Root MSE = 5.9788

------------------------------------------------------------------------------

D.approval | Coef. Std. Err. t P>|t| [95% Conf. Interval]

-------------+----------------------------------------------------------------

approval |

L1 | -.1642488 .042101 -3.90 0.000 -.24735 -.0811475

t | -.0133481 .0098681 -1.35 0.178 -.0328263 .0061301

_cons | 10.27947 2.869247 3.58 0.000 4.615999 15.94294

------------------------------------------------------------------------------

If λ−1=0 then the series is not stationary (the series contains what is called a unit

root). In the example above, λ−1<0

If β>0 then the series contains a trend. In the example above β=0

If β=0 and λ−1 is not zero, then the series is stationary. The approval series is

stationary.

We can use the same test to make sure that all of the variables in order model are

stationary.

To automatically run this test in STATA, use the dfuller command. Notice that I use

both the regress and trend options. regress reguests that the table be included, trend

indicates that the trend variable should be included. 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. We can conclude that the

coefficient on approval t-1 is not zero, so the series is stationary

. dfuller approval, regress trend

Test 1% Critical 5% Critical 10% Critical

Statistic Value Value Value

------------------------------------------------------------------------------

Z(t) -3.901 -4.015 -3.440 -3.140

------------------------------------------------------------------------------

* MacKinnon approximate p-value for Z(t) = 0.0121

------------------------------------------------------------------------------

D.approval | Coef. Std. Err. t P>|t| [95% Conf. Interval]

-------------+----------------------------------------------------------------

approval |

L1 | -.1642488 .042101 -3.90 0.000 -.24735 -.0811475

_trend | -.0133481 .0098681 -1.35 0.178 -.0328263 .0061301

_cons | 10.26612 2.862827 3.59 0.000 4.615321 15.91692

------------------------------------------------------------------------------

(ii) detrending – remove a linear trend. Identify the linear trend (regression z on t).

Create a predicted value. Subtract the predicted value from the original. Challenge

(and why this is often not done): is it very useful to assume a linear trend?

stationary by taking the first difference. Rather than using zt as a dependent variable,

the dependent variable becomes zt-zt-1. A series that is stationary without any

transformation is designated as I(0), or integrated of order 0. A series that has

stationary first differences is designated I(1), or integrated of order 1.

(iii) Carefully consider the substantive implications of these transformations.

Consider the presidential approval example. Consider the implications of a positive

link between presidential approval and economic conditions

Model 1 (raw series). The level of presidential approval is a function of the level of

MICS. When consumer sentiment is high, approval is high.

trend. If MICS is increasing and remains increasing, the level of presidential

approval does not change. If the rate of increase of MICS falls (an observations is

below trend), then presidential approval falls.

in MICS. If MICS falls, then presidential approval falls. If MICS falls from very

high to high, then presidential approval falls. If there is no change in consumer

sentiment (remains low), then approval is expected to remain at the mean.

The technical prescription (difference) may or may not coincide with what you think

happens substantively.

Once you are confident the variables are stationary, then you can proceed to OLS.

-------------+------------------------------ F( 1, 174) = 72.56

Model | 7220.76528 1 7220.76528 Prob > F = 0.0000

Residual | 17316.2643 174 99.5187602 R-squared = 0.2943

-------------+------------------------------ Adj R-squared = 0.2902

Total | 24537.0296 175 140.211597 Root MSE = 9.9759

------------------------------------------------------------------------------

approval | Coef. Std. Err. t P>|t| [95% Conf. Interval]

-------------+----------------------------------------------------------------

mics | .5935344 .0696798 8.52 0.000 .456008 .7310608

_cons | 4.298118 6.091941 0.71 0.481 -7.725493 16.32173

3. Diagnosing high order autocorrelation.

What is the correlation between the values of the error term at t and t-1, t and t-2, t and t-

3? STATA permits use to visually inspect the level of correlation across error terms at

each lag – the plot is labeled a correlogram.

corrgram res1

-1 0 1 -1 0 1

LAG AC PAC Q Prob>Q [Autocorrelation] [Partial Autocor]

-------------------------------------------------------------------------------

1 0.8108 0.8121 117.69 0.0000 |------ |------

2 0.6248 -0.0827 187.97 0.0000 |---- |

3 0.4673 -0.0269 227.52 0.0000 |--- |

4 0.3575 0.0318 250.79 0.0000 |-- |

5 0.2591 -0.0359 263.09 0.0000 |-- |

6 0.1722 -0.0362 268.55 0.0000 |- |

7 0.1130 0.0242 270.92 0.0000 | |

8 0.0508 -0.0721 271.4 0.0000 | |

9 0.0415 0.1188 271.72 0.0000 | |

10 0.0085 -0.1003 271.74 0.0000 | |

11 -0.0580 -0.1248 272.38 0.0000 | |

12 -0.0994 0.0322 274.26 0.0000 | |

13 -0.1583 -0.1327 279.08 0.0000 -| -|

14 -0.1642 0.0812 284.3 0.0000 -| |

15 -0.1130 0.1616 286.78 0.0000 | |-

16 -0.0398 0.0542 287.09 0.0000 | |

17 -0.0165 -0.0719 287.14 0.0000 | |

18 -0.0174 -0.0322 287.2 0.0000 | |

19 0.0167 0.0803 287.26 0.0000 | |

20 0.0369 0.0030 287.53 0.0000 | |

21 0.0484 -0.0360 288.01 0.0000 | |

22 0.0260 -0.0777 288.14 0.0000 | |

23 -0.0131 -0.0453 288.18 0.0000 | |

24 -0.0391 -0.0574 288.49 0.0000 | |

25 -0.0129 0.1483 288.53 0.0000 | |-

26 0.0151 -0.0053 288.57 0.0000 | |

27 0.0276 0.0582 288.74 0.0000 | |

28 0.0413 0.0673 289.1 0.0000 | |

29 0.0588 0.0675 289.83 0.0000 | |

30 0.0783 0.0837 291.15 0.0000 | |

31 0.1298 0.1569 294.79 0.0000 |- |-

32 0.1707 0.0391 301.12 0.0000 |- |

33 0.1709 0.0490 307.52 0.0000 |- |

34 0.1645 0.0425 313.49 0.0000 |- |

35 0.1878 0.0924 321.33 0.0000 |- |

36 0.1687 -0.1532 327.7 0.0000 |- -|

37 0.1425 -0.0394 332.28 0.0000 |- |

38 0.1135 0.0388 335.2 0.0000 | |

39 0.0952 0.0911 337.27 0.0000 | |

40 0.0542 -0.0576 337.95 0.0000 | |

(b) Q test

If the error is strictly a product of random error (et=vt), where vt is mean zero and

variance sigma2, then the autocorrelation function should be composed of ρ=0 for k>0.

This is described as a white noise process. If there is no serial correlation – at lag 1 or

other lags – in our model, then the error term should appear to be white noise. There is a

formal test for this implemented in STATA – the Ljung Box Q. Formally, 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. STATA reports if the test is statistically

significant. If the test is significant, then the residuals are correlated.

wntestq res1

---------------------------------------

Portmanteau (Q) statistic = 337.9503

Prob > chi2(40) = 0.0000

Iteration 0: log likelihood = -558.30383

Iteration 1: log likelihood = -555.80467

Iteration 2: log likelihood = -555.7188

Iteration 3: log likelihood = -555.70873

Iteration 4: log likelihood = -555.70662

(switching optimization to BFGS)

Iteration 5: log likelihood = -555.70602

Iteration 6: log likelihood = -555.70576

Iteration 7: log likelihood = -555.70576

ARIMA regression

Wald chi2(2) = 529.56

Log likelihood = -555.7058 Prob > chi2 = 0.0000

------------------------------------------------------------------------------

| OPG

approval | Coef. Std. Err. z P>|z| [95% Conf. Interval]

-------------+----------------------------------------------------------------

approval |

mics | .3900807 .0814409 4.79 0.000 .2304594 .549702

_cons | 22.18424 7.137865 3.11 0.002 8.19428 36.1742

-------------+----------------------------------------------------------------

ARMA |

ar |

L1 | .8286119 .0421585 19.65 0.000 .7459827 .911241

-------------+----------------------------------------------------------------

/sigma | 5.669955 .2467909 22.97 0.000 5.186254 6.153656

------------------------------------------------------------------------------

Iteration 0: log likelihood = -614.7891

Iteration 1: log likelihood = -598.99993

Iteration 2: log likelihood = -595.73072

Iteration 3: log likelihood = -595.64723

Iteration 4: log likelihood = -595.64185

(switching optimization to BFGS)

Iteration 5: log likelihood = -595.63556

Iteration 6: log likelihood = -595.63516

Iteration 7: log likelihood = -595.63514

ARIMA regression

Wald chi2(2) = 188.74

Log likelihood = -595.6351 Prob > chi2 = 0.0000

------------------------------------------------------------------------------

| OPG

approval | Coef. Std. Err. z P>|z| [95% Conf. Interval]

-------------+----------------------------------------------------------------

approval |

mics | .5090958 .0745687 6.83 0.000 .3629438 .6552478

_cons | 11.64684 6.569249 1.77 0.076 -1.228655 24.52233

-------------+----------------------------------------------------------------

ARMA |

ma |

L1 | .680474 .0664946 10.23 0.000 .5501471 .810801

-------------+----------------------------------------------------------------

/sigma | 7.124995 .3504756 20.33 0.000 6.438076 7.811915

------------------------------------------------------------------------------

3. MA (1) AR (1 4)

Iteration 0: log likelihood = -558.24089

Iteration 1: log likelihood = -554.74565

Iteration 2: log likelihood = -554.65487

Iteration 3: log likelihood = -554.64873

Iteration 4: log likelihood = -554.64796

(switching optimization to BFGS)

Iteration 5: log likelihood = -554.64778

Iteration 6: log likelihood = -554.64771

Iteration 7: log likelihood = -554.64771

ARIMA regression

Sample: 1 to 176 Number of obs = 176

Wald chi2(5) = 460.81

Log likelihood = -554.6477 Prob > chi2 = 0.0000

------------------------------------------------------------------------------

| OPG

approval | Coef. Std. Err. z P>|z| [95% Conf. Interval]

-------------+----------------------------------------------------------------

approval |

mics | .3720738 .0794335 4.68 0.000 .2163869 .5277607

_cons | 23.70178 6.94251 3.41 0.001 10.09471 37.30885

-------------+----------------------------------------------------------------

ARMA |

ar |

L1 | .7803232 .0683468 11.42 0.000 .646366 .9142804

L4 | .0101643 .072298 0.14 0.888 -.1315372 .1518659

ma |

L1 | .134136 .0971602 1.38 0.167 -.0562946 .3245665

L4 | .0211127 .0855824 0.25 0.805 -.1466257 .1888511

-------------+----------------------------------------------------------------

/sigma | 5.635385 .2446229 23.04 0.000 5.155932 6.114837

Next week

PLS 692.

Assignment Number 3.

ARIMA models

Last week we used a remedy for serial correlation that assumed the special case of "first

order autoregressive" error. This week we both use a more general remedy and tackle

new tests for stationarity and high order autcorrelation. We will again use Green et al

data on presidential approval and macropartisanship. 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.

Your assignment

1. What is the link between presidential approval and the variables you include in the

model? Describe your expectations

2. Estimate the model implied by your expectations with OLS. Report the results

Note: the Dickey Fuller augmented test for a unit root determines if the series has a unit

root. Stationary series do not have a unit root, 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.05 implies the series is stationary)

a. Report and interpret the Ljung-Box Q test statistic for higher order serial

correlation (the default is to test up to lag 40). Note: the statistical test is a

Lagrange Multiplier test. If the value is high, then the null hypothesis - no high

order serial correlation --must be rejected. (An estimated p-value<0.05 imples

serial correlation.)

b. Produce and interpret the correlogram. Are there strong relationships between

residuals at any lags?

5. Specify and estimate an ARIMA model and compare the results to the simple OLS

6. Is there still a problem with serial correlation? Repeat 4(a), and 4(b) above

- stataUploaded bygarryduff
- StataUploaded byem777
- STATAUploaded byamudaryo
- Stata Manual 2009Uploaded bytomrannosaurus
- DickeyFullerTestUsingSPSS.docx(1).pdfUploaded byjamweezeh
- Governance Infrastructure and Location of Foreign Direct Investment in the People’s Republic of ChinaUploaded byADBI Publications
- ADF TestUploaded byPatrice Furaha
- Nonlinear_time_series_analysis.pdfUploaded byErnesto C
- Signal Extraction for Nonstationary Multivariate Time SeriesUploaded bymirando93
- IJAIEM-2013-09-30-088.pdfUploaded byAnonymous vQrJlEN
- Stata 02 04timeseriesanalysis 120605154536 Phpapp02Uploaded byHector Garcia
- Price Forecasting using Artificial Neural NetworkUploaded byEditor IJRITCC
- Acteduk Ct6 Hand Qho v04Uploaded byankitag612
- Introduction to SAS Enterprise Guide 4.1 for Statistical AnalysisUploaded byNarendra Reddy
- Spectrum Estimation Traditional MethodsUploaded byShashi Bhushan Kotwal
- FIAR, An R Package for Analyzing Functional Integration in the BrainUploaded byflyinzesky
- STA457Uploaded byrachel
- Combining Probability Forecasts (Michael P. Clementsa David I. Harvey - 2010)Uploaded bySemanticZen
- 11 a Field Study of the Impact of a Performance-Based Incentive (1)Uploaded bySepty Dinda P
- Time.series.regressionUploaded bynoopurr
- Lecture Notes GLSUploaded byKasem Ahmed
- Undergraduate EconometricUploaded byAcho Jie
- Time Series Analysis.pdfUploaded byMayur Hampiholi
- packaging challenge technology process bookletUploaded byapi-287054847
- Tgs ochaUploaded byIip Miftahudin
- Scan 0001Uploaded bymonika_yadav
- Ghosh Constantinides 2016 What Information Drives Asset Prices?Uploaded byroblee1
- Doc_51enUploaded bysolajero
- Forecasting Course Work 2010 20111Uploaded byClive Gladstone
- STAT_SPSSUploaded byJunilyn Samoya

- Mic 5010Uploaded byAnonymous QakmLc3kTI
- MFC 101 Owners ManualUploaded byJung il Shin
- Diadem Version 2011 HoeUploaded byNuovo Sviluppo Italiano
- 6110 mfpUploaded bywse00
- MAGNETIC EFFECTS ON PLANT GROWTH.pdfUploaded byCarlos Rohán Tamez
- ms exelUploaded byAnurag Goel
- u4.23.05Uploaded bylbo33
- Industrial Training 02Uploaded byMohit Bauskar
- CARRARO Axle Repair Ca130070Uploaded bySunthron Somchai
- Mflwt80dw 00 EnUploaded bydhavalesh1
- Ch02 (EE).pptUploaded byCarl Agape Davis
- Readme Mam 627Uploaded bykarolkos
- bs1363.pdfUploaded byMuhammed Talha Qureshi
- Gas Dynamics-Shock WavesUploaded byRahul
- MD Singh Power Electronics Solution Manual to Chapter 11Uploaded byAnoop Mathew
- PV Module Reliability Scorecard Report 2017Uploaded byAnonymous NlJj6AJJ
- Application of Ionic Liquid [DMIM]DMP Pretreatment in the Hydrolysis of Sugarcane Bagasse for Biofuel ProductionUploaded byArief
- ISOC IoT Overview 20151221 EnUploaded byvedran188
- Pleiades DEM Extraction and DSM to DTM ConversionUploaded byChristian Vargas
- Technical Bulletin Surface Treatment - EnCRES DUBUIT - 06Uploaded bymarimadi
- RR90Uploaded byGeanovu Adrian Constantin
- ME304_CA2Uploaded byKeshav Gk
- BS Code ListUploaded bytuski24
- Feature Selection Based on Rough Sets and Particle Swarm OptimizationUploaded bydhiec
- 06 - User & Groups ManagementUploaded bySoufianeAmrani
- Rotofor ManualUploaded bydnajen
- gsm codeUploaded byguddu9
- HdrUploaded byJimmy Pappas
- DD10 Operating Manual Part1Uploaded bygurmeet_4800
- Atlas Copco Spare Parts List CC 2100Uploaded byВенцислав Венев