Error Correction Models Explained
Error Correction Models Explained
Error Correction Models (ECMs) are a category of multiple time series models that directly estimate the speed at which a dependent variable Y - returns to equilibrium after a change in an independent variable - X. ECMs are useful for estimating both short term and long term effects of one time series on another.
Thus, they often mesh well with our theories of political and social processes. Theoretically-driven approach to estimating time series models.
ECMs are useful models when dealing with integrated data, but can also be used with stationary data.
An Introduction to ECMs
The basic structure of an ECM Yt = + Xt-1 - ECt-1 + t
Where EC is the error correction component of the model and measures the speed at which prior deviations from equilibrium are corrected.
An Introduction to ECMs
As we will see, the versatility of ECMs give them a number of desirable properties.
Estimates of short and long term effects Easy interpretation of short and long term effects Applications to both integrated and stationary time series data
Error correction models can be used to estimate the following quantities of interest for all X variables.
Short term effects of X on Y Long term effects of X on Y (long run multiplier) The speed at which Y returns to equilibrium after a deviation has occurred.
ECMs can be appropriate whenever (1) we have time series data and (2) are interested in both short and long term relationships between multiple time series.
II.
Yt = + Yt-1 + t
Where | p | < 1 and t is also stationary with a mean of zero and variance 2
Note that when 0 < | p | < 1 the time series is stationary but contains autocorrelation.
Yt
ei
i =1
Or Yt = + Yt-1 + t Where p = 1
For our purposes, we focus on time series data that are I(1). Data that are stationary after being first-differenced. I(1) processes are fairly common in time series data
The effect of past shocks is permanently incorporated into the memory of the series. The series is a function of other integrated processes.
20 time
40
60
Analyzing integrated time series in level form dramatically increases the likelihood of making a Type-II error. Problem of spurious associations. High R2
What if our time series share a long run relationship? If the time series share an equilibrium relationship with an errorcorrection mechanism, then the stochastic trends of the time series will be correlated with one another. Cointegration
A common solution to these problems is to analyze the data in differenced form. Look only at short term effects
There is a linear combination of the two time series that is I(0) - i.e. stationary. Two (or more) series are cointegrated if each has a long run component, but these components cancel out between the series.
Share stochastic trends
Another rather trivial example of a random walk is the walk (or jaunt) of a dog, which can be expressed as Yt - Yt-1 = wt Where wt represents the stationary, while-noise process of the dogs steps.
Conintegrated data are never expected to drift too far away from each other, maintaining an equilibrium relationship.
Yt = Xt + Zt
0 20 time drunk dog 40 60
Z will capture any shock to either Y or X. If Y and X are cointegrated, then the relationship between the two will adjust accordingly.
If Z is negative, then Y is too high and will be adjusted downward in the next period. If Z is positive, then Y is too low and will be adjusted upward in the next time period.
First, we can obtain an estimate of Z by regressing Y on X. Step 2: Second, we can regress Yt on Zt-1 plus any relevant short term effects.
Zt = Yt - Xt -
Yt = 0 Xt-1 - 1Zt-1
Note that all variables in this model are stationary.
Yt = + Xt-1 - ECt-1 + t
In the Engle and Granger Two-Step Method the EC component is derived from cointegrated time series as Z.
Yt = 0 Xt-1 - 1Zt-1
0 captures the short term effects of X in the prior period on Y in the current period. 1 captures the rate at which the system Y adjusts to the equilibrium state after a shock. In other words, it captures the speed of error correction.
3) Obtain an estimate of the cointegrating vector - Z - by regressing Yt on Xt and taking the residuals. 4) Enter the lagged residuals - Z - into a regression of Yt on Xt-1.
We expect changes in X to produce long run responses in Y, as Y adjusts back to the equilibrium state.
X and Y: Cointegrated?
25 20
10
15
Tests for unit-root process tend to be controversial, primarily due to their low power.
5
For our purposes, we will focus on Dickey-Fuller (DF) and Augmented Dickey-Fuller tests to examine the (non)stationarity of our time series.
1961m1 1962m1 1963m1 months Y X 1964m1 1965m1 0 1960m1
Dickey-Fuller Tests
Basic Dickey-Fuller test
Dickey-Fuller Tests
Basic Dickey-Fuller test With a constant (drift) With a time trend
xt = xt 1 + t
xt = xt 1 + t
xt = t + xt 1 + t
xt = t + xt 1 + t
xt = t + xt 1 + t + t
xt = t + xt 1 + t + t
If X is a random walk process, then = 0 The null hypothesis is that X is a random walk MacKinnon values for statistical significance
Note that in small samples the standard error of will be large, making it likely that we fail to reject the null when we really should
Augmented Dickey-Fuller
We can remove any remaining serial correlation in t by introducing an appropriate number of lagged differences of X in the equation.
k
Is X Integrated?
dfuller X, regress Dickey-Fuller test for unit root Number of obs = 63
xt = xt 1 + i x1t i + t
i =1
xt = t + xt 1 + i x1t i + t
i =1
---------- Interpolated Dickey-Fuller --------Test 1% Critical 5% Critical 10% Critical Statistic Value Value Value -----------------------------------------------------------------------------Z(t) -1.852 -3.562 -2.920 -2.595 -----------------------------------------------------------------------------MacKinnon approximate p-value for Z(t) = 0.3548 -----------------------------------------------------------------------------D.X | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------X | L1. | -.1492285 .0805656 -1.85 0.069 -.3103293 .0118724 _cons | 1.365817 .7149307 1.91 0.061 -.0637749 2.79541 ------------------------------------------------------------------------------------------------------------------------------------------------
Is X Integrated?
dfuller X, lags(4) regress Number of obs = 59 Augmented Dickey-Fuller test for unit root ---------- Interpolated Dickey-Fuller --------Test 1% Critical 5% Critical 10% Critical Statistic Value Value Value -----------------------------------------------------------------------------Z(t) 0.690 -3.567 -2.923 -2.596 -----------------------------------------------------------------------------MacKinnon approximate p-value for Z(t) = 0.9896 -----------------------------------------------------------------------------D.X | Coef. Std. Err. t P>|t| [95% Conf.Interval] -------------+---------------------------------------------------------------X | L1. | .0696672 .1008978 0.69 0.493 -.1327082 .2720426 LD. | -.5724812 .1738494 -3.29 0.002 -.9211789 .2237835 L2D. | -.4935811 .1776346 -2.78 0.008 -.8498709 -.1372912 L3D. | -.2891465 .1677748 -1.72 0.091 -.6256601 .0473671 L4D. | -.0898266 .1468121 -0.61 0.543 -.3842943 .2046412 _cons | -.2525666 .839646 -0.30 0.765 -1.936683 1.43155 ------------------------------------------------------------------------------
Is X Integrated?
If X is I(1), then the first difference of X should be stationary.
---------- Interpolated Dickey-Fuller --------Test 1% Critical 5% Critical 10% Critical Statistic Value Value Value -----------------------------------------------------------------------------Z(t) -10.779 -3.563 -2.920 -2.595 -----------------------------------------------------------------------------MacKinnon approximate p-value for Z(t) = 0.0000
Is Y Integrated?
dfuller Y, regress Dickey-Fuller test for unit root Number of obs = 63
Is Y Integrated?
dfuller dif_Y, regress Dickey-Fuller test for unit root Number of obs = 62 ---------- Interpolated Dickey-Fuller --------Test 1% Critical 5% Critical 10% Critical Statistic Value Value Value -----------------------------------------------------------------------------Z(t) -9.071 -3.563 -2.920 -2.595 -----------------------------------------------------------------------------MacKinnon approximate p-value for Z(t) = 0.0000 -----------------------------------------------------------------------------D.dif_Y | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------dif_Y | L1. | -1.159903 .1278662 -9.07 0.000 -1.415674 -.9041329 _cons | .2219184 .3259962 0.68 0.499 -.4301711 .8740078 ------------------------------------------------------------------------------
---------- Interpolated Dickey-Fuller --------Test 1% Critical 5% Critical 10% Critical Statistic Value Value Value -----------------------------------------------------------------------------Z(t) -1.323 -3.562 -2.920 -2.595 -----------------------------------------------------------------------------MacKinnon approximate p-value for Z(t) = 0.6184 -----------------------------------------------------------------------------D.Y | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------Y | L1. | -.0854922 .064599 -1.32 0.191 -.2146659 .0436814 _cons | 1.061271 .7208156 1.47 0.146 -.3800884 2.502631 ------------------------------------------------------------------------------
Cointegration
Both X and Y appear to be integrated of the same order: I(1). If they are cointegrated, then they share stochastic trends. In the following regression, t should be stationary and should be statistically significant and in the expected direction.
Cointegrating Regression
regress Y X Source | SS df MS -------------+-----------------------------Model | 1009.22604 1 1009.22604 Residual | 676.523964 62 10.9116768 -------------+-----------------------------Total | 1685.75 63 26.7579365 Number of obs F( 1, 62) Prob > F R-squared Adj R-squared Root MSE = = = = = = 64 92.49 0.0000 0.5987 0.5922 3.3033
Yt = t + Xt +t
Lets see if this is the case
-----------------------------------------------------------------------------Y | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------X | 1.206126 .1254135 9.62 0.000 .9554281 1.456824 _cons | .0108108 1.135884 0.01 0.992 -2.259789 2.28141 ------------------------------------------------------------------------------
Cointegrating Regression
predict r, resid
---------- Interpolated Dickey-Fuller --------Test 1% Critical 5% Critical 10% Critical Statistic Value Value Value -----------------------------------------------------------------------------Z(t) -5.487 -3.562 -2.920 -2.595 -----------------------------------------------------------------------------MacKinnon approximate p-value for Z(t) = 0.0000
-15 1960m1
-10
Residuals -5 0
10
1961m1
1962m1
1963m1 months
1964m1
1965m1
Yt = + 1*Xt-1 + 2*Rt-1 +t
-----------------------------------------------------------------------------dif_Y | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------dlag_X | -.1161038 .1609359 -0.72 0.473 -.4381358 .2059282 lag_r | -.3160139 .0999927 -3.16 0.002 -.5160988 -.1159291 _cons | .210471 .3074794 0.68 0.496 -.4047939 .8257358 ------------------------------------------------------------------------------
The error correction mechanism is negative and significant, suggesting that deviations from equilibrium are corrected at about 32% per month. However, X does not appear to have significant short term effects on Y.
Granger Causality
Granger causality can be ascertained in the ECM framework by
regressing each time series in differenced form on all time series in both differenced and level form.
Granger Causality
regress dif_Y l.dif_Y l.dif_X lag_Y lag_X Source | SS df MS -------------+-----------------------------Model | 69.5277246 4 17.3819311 Residual | 334.149695 57 5.86227535 -------------+-----------------------------Total | 403.677419 61 6.61766261 Number of obs = 62 F( 4, 57) = 2.97 Prob > F = 0.0270 R-squared = 0.1722 Adj R-squared = 0.1141 Root MSE = 2.4212
Granger Causality
regress dif_X l.dif_X l.dif_Y lag_X lag_Y Number of obs = F( 4, 57) Prob > F R-squared Adj R-squared Root MSE 62 5.87 0.0005 0.2917 0.2420 1.7779 Source | SS df MS -------------+-----------------------------Model | 74.2042429 4 18.5510607 Residual | 180.182854 57 3.1611027 -------------+-----------------------------Total | 254.387097 61 4.17028027 = = = = =
-----------------------------------------------------------------------------dif_Y | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------dif_Y | L1. | .0483244 .1399056 0.35 0.731 -.2318318 .3284806 dif_X | L1. | -.2205689 .1802099 -1.22 0.226 -.581433 .1402952 lag_Y | -.3557259 .1161894 -3.06 0.003 -.5883911 -.1230606 lag_X | .5675793 .1899981 2.99 0.004 .1871146 .948044 _cons | -.928984 .9426534 -0.99 0.329 -2.816615 .9586468 ------------------------------------------------------------------------------
-----------------------------------------------------------------------------dif_X | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------dif_X | L1. | -.0640245 .132332 -0.48 0.630 -.3290147 .2009657 dif_Y | L1. | .0014809 .1027357 0.01 0.989 -.2042438 .2072056 lag_X | -.4676537 .1395197 -3.35 0.001 -.7470371 -.1882703 lag_Y | .2847586 .0853204 3.34 0.001 .1139075 .4556097 _cons | 1.194109 .6922106 1.73 0.090 -.1920183 2.580237 ------------------------------------------------------------------------------
The Engle and Granger approach assumes endogeneity between the cointegrating time series.
Integration Issues
Error correction approaches that rely on cointegration of two or more I(1) time series become problematic when we are dealing with data that are not truly (co)integrated. I(1) processes may be incorrectly included into the cointegrating regression - producing spurious associations - if two other I(1) cointegrated time series are already included (Durr 1992)
This problem increases with sample size.
The low power of unit root tests can lead us to conclude our data are integrated when they are not.
Our data are integrated when they are not. Our data are cointegrated when they are not. Our data are not cointegrated, therefore, an ECM is not appropriate
10
Single Equation ECMs are appropriate for both cointegrated and longmemoried, but stationary, data.
Cointegration may imply error correction, but does error correction imply cointegration?
Single Equation ECMs estimate a long term effect for each independent variable, allowing us to judge the contribution of each.
Allow for easier interpretation of the effects of the independent variables.
Where Zt = Yt - Xt -
k1 =
2 1
Where k1 is the total long term effect of X on Y (a.k.a the long run multiplier) - distributed over future time periods. Single equation ECMs are particularly useful for allowing us to also estimate k1s standard error, and therefore statistical significance.
11
Yt = + 0 Yt + 1Xt - 2Xt + t
Where 1 is the long term effect and is estimated with a standard error Notice the problem: we have Yt on the right side of the equation We can proxy Yt as:
Note that each independent variable is now forced to make an independent contribution to the long term relationship, solving one of the problems in the two-step estimator.
Yt = + Yt-1 + Xt + Xt + t
How do we know Single Equation ECMs are appropriate with stationary data?
12
k1 =
2 + 1 1 0
Y and X will be in their long term equilibrium state when Y = k0 + k1X where
k0 =
1 0
1 + 2 estimates the long term effect of a unit change in X on Y (the coefficient on Xt-1 in the ECM)
ECM
ADL
---------- Interpolated Dickey-Fuller --------Test 1% Critical 5% Critical 10% Critical Statistic Value Value Value -----------------------------------------------------------------------------Z(t) -3.353 -3.573 -2.926 -2.598 -----------------------------------------------------------------------------MacKinnon approximate p-value for Z(t) = 0.0127
13
-----------------------------------------------------------------------------dif_y | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------dif_x | 1.324821 .200003 6.62 0.000 .9232986 1.726344 lag_y | -.4248235 .1146587 -3.71 0.001 -.6550105 -.1946365 lag_x | .5182186 .1971867 2.63 0.011 .1223498 .9140873 _cons | 13.12112 4.201755 3.12 0.003 4.685745 21.55649 ------------------------------------------------------------------------------
14
1.5
Change in Y
Y
0 0 2 Time Period 4 6
1 0
1.5
.5
2.5
Time Period
-----------------------------------------------------------------------------dif_y | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------lag_y | -.4248235 .1146587 -3.71 0.001 -.6550105 -.1946365 x | .5182186 .1971867 2.63 0.011 .1223498 .9140873 dif_x | .8066027 .2278972 3.54 0.001 .34908 1.264125 _cons | 13.12112 4.201755 3.12 0.003 4.685745 21.55649 ------------------------------------------------------------------------------
-----------------------------------------------------------------------------y | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------deltaYhat | -1.353919 .2698973 -5.02 0.000 -1.89576 -.8120773 x | 1.219844 .1245296 9.80 0.000 .9698408 1.469848 dif_x | 1.898677 .3963791 4.79 0.000 1.102913 2.694442 _cons | 30.88605 2.68463 11.50 0.000 25.49643 36.27567 ------------------------------------------------------------------------------
= = = = =
Can we gain similar estimates of the short and long term effects of X on Y from the ADL model?
-----------------------------------------------------------------------------y | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------lag_y | .5751765 .1146587 5.02 0.000 .3449895 .8053635 x | 1.324821 .200003 6.62 0.000 .9232986 1.726344 lag_x | -.8066027 .2278972 -3.54 0.001 -1.264125 -.34908 _cons | 13.12112 4.201755 3.12 0.003 4.685745 21.55649 ------------------------------------------------------------------------------
15
Our estimate of the contemporaneous effects of X on Y 1.32 units: the same as in the ECM. The long term effect of X on Y at t+1 can be calculated as: 1.32 - .81 = .52 which is equivalent to the .52 estimate in the ECM Deviations from equilibrium are maintained at a rate of 58% per time period, which implies that deviations from equilibrium are corrected at a rate of 42% per time period (.58 - 1).
Y = 30.89 + 1.22X
16