I introduced VAR model in the lastest post. In this post, I want to decribe VEC model. Abeit VAR and VEC model are multivariate generalization of ECM but VAR model is designed for use with nonstationary time and to be cointergrated, VEC is designed to contain the cointegration relations.
Villa Lora, Juan Miguel (in stata-ers group) said:
"Let's say you have var1 and var1, if var1 causes "Grangerly" to var2 and both don't have jointly a unit root you might run a VAR. If var1 doesn't cause "Grangerly" var2 but they jointly have a unit root the correct
model is the error correction."
I thinks it's useful for ECM-beginner to build their models.
The first step is explore Granger relationship between vars : You can refer http://www.econ.uiuc.edu/~econ472/tutorial8.html to use F- test to determine Granger Causuality:
A simple example in Stata:
*Causality direction A: Do chickens Granger-cause eggs? For example, using the number of lags equals 1 you proceed as follows:
regress egg L.egg L.chic
Source | SS df MS Number of obs = 53
---------+------------------------------ F( 2, 50) = 645.24
Model | 38021977.8 2 19010988.9 Prob > F = 0.0000
Residual | 1473179.16 50 29463.5832 R-squared = 0.9627
---------+------------------------------ Adj R-squared = 0.9612
Total | 39495157.0 52 759522.25 Root MSE = 171.65
------------------------------------------------------------------------------
egg | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
egg |
L1 | .9613121 .027241 35.289 0.000 .906597 1.016027
chic |
L1 | -.0001136 .0005237 -0.217 0.829 -.0011655 .0009383
_cons | 279.3413 279.6937 0.999 0.323 -282.44 841.1226
------------------------------------------------------------------------------
And you can test if chickens Granger cause eggs using a F-test:
test L.chic
( 1) L.chic = 0.0
F( 1, 50) = 0.05
Prob > F = 0.8292
**Causality direction B: Do eggs Granger-cause chickens? This involves the same techniques, but here you need to regress chickens against the lags of chickens and the lags of eggs. For example, using one lag you have:
regress chic L.egg L.chic
Source | SS df MS Number of obs = 53
---------+------------------------------ F( 2, 50) = 65.92
Model | 8.0984e+10 2 4.0492e+10 Prob > F = 0.0000
Residual | 3.0712e+10 50 614248751 R-squared = 0.7250
---------+------------------------------ Adj R-squared = 0.7140
Total | 1.1170e+11 52 2.1480e+09 Root MSE = 24784
------------------------------------------------------------------------------
chic | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
egg |
L1 | -4.32139 3.933252 -1.099 0.277 -12.22156 3.57878
chic |
L1 | .8349305 .075617 11.042 0.000 .6830493 .9868117
_cons | 88951.72 40384.25 2.203 0.032 7837.569 170065.9
------------------------------------------------------------------------------
test L.egg
( 1) L.egg = 0.0
F( 1, 50) = 1.21
Prob > F = 0.2772
Are those numbers similar to those you have obtained using R?
Do that for the for lags 1,2,3, and 4. Please provide a table in the same format of Thurman and Fisher's (1988), containing your results, plus a graphical analysis.
Causality in further lags: To test Granger causality in further lags, the procedures are the same. Just remember to test the joint hypothesis of non-significance of the "causality" terms.
Example: Do eggs Granger cause chickens (in four lags)?
regress chic L.egg L2.egg L3.egg L4.egg L.chic L2.chic L3.chic L4.chic
Source | SS df MS Number of obs = 50
---------+------------------------------ F( 8, 41) = 22.75
Model | 8.9451e+10 8 1.1181e+10 Prob > F = 0.0000
Residual | 2.0154e+10 41 491569158 R-squared = 0.8161
---------+------------------------------ Adj R-squared = 0.7802
Total | 1.0961e+11 49 2.2369e+09 Root MSE = 22171
------------------------------------------------------------------------------
chic | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
egg |
L1 | 87.38472 26.87471 3.252 0.002 33.11014 141.6593
L2 | -62.49408 41.76817 -1.496 0.142 -146.8466 21.85845
L3 | -8.214513 44.09684 -0.186 0.853 -97.26989 80.84086
L4 | -22.63552 30.59828 -0.740 0.464 -84.43 39.15897
chic |
L1 | .2332566 .1934323 1.206 0.235 -.1573878 .623901
L2 | .45797 .2039095 2.246 0.030 .0461663 .8697736
L3 | -.0184877 .2059394 -0.090 0.929 -.4343907 .3974153
L4 | .0256691 .1779262 0.144 0.886 -.3336602 .3849984
_cons | 147330.3 46385.32 3.176 0.003 53653.2 241007.3
------------------------------------------------------------------------------
and then test the joint significance of all lags of eggs
test L.egg L2.egg L3.egg L4.egg
( 1) L.egg = 0.0
( 2) L2.egg = 0.0
( 3) L3.egg = 0.0
( 4) L4.egg = 0.0
F( 4, 41) = 4.26
Prob > F = 0.0057
I thinks it's useful for ECM-beginner to build their models.
The first step is explore Granger relationship between vars : You can refer http://www.econ.uiuc.edu/~econ472/tutorial8.html to use F- test to determine Granger Causuality:
" ...
In STATA: The first
thing to do is to use the command summarize, detail or other functions
presented in the previous tutorials, to obtain a description of the data.
Once again, it is required that you show explicitly what are the
NULL and ALTERNATIVE hypotheses of this test, and the regression equations
you are going to run. The results of Thurman and Fisher's (1988), Table
1, can be easily replicated using OLS regressions and the time series commands
introduced in the previous tutorials.
A simple example in Stata:
*Causality direction A: Do chickens Granger-cause eggs? For example, using the number of lags equals 1 you proceed as follows:
regress egg L.egg L.chic
Source | SS df MS Number of obs = 53
---------+------------------------------ F( 2, 50) = 645.24
Model | 38021977.8 2 19010988.9 Prob > F = 0.0000
Residual | 1473179.16 50 29463.5832 R-squared = 0.9627
---------+------------------------------ Adj R-squared = 0.9612
Total | 39495157.0 52 759522.25 Root MSE = 171.65
------------------------------------------------------------------------------
egg | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
egg |
L1 | .9613121 .027241 35.289 0.000 .906597 1.016027
chic |
L1 | -.0001136 .0005237 -0.217 0.829 -.0011655 .0009383
_cons | 279.3413 279.6937 0.999 0.323 -282.44 841.1226
------------------------------------------------------------------------------
And you can test if chickens Granger cause eggs using a F-test:
test L.chic
( 1) L.chic = 0.0
F( 1, 50) = 0.05
Prob > F = 0.8292
**Causality direction B: Do eggs Granger-cause chickens? This involves the same techniques, but here you need to regress chickens against the lags of chickens and the lags of eggs. For example, using one lag you have:
regress chic L.egg L.chic
Source | SS df MS Number of obs = 53
---------+------------------------------ F( 2, 50) = 65.92
Model | 8.0984e+10 2 4.0492e+10 Prob > F = 0.0000
Residual | 3.0712e+10 50 614248751 R-squared = 0.7250
---------+------------------------------ Adj R-squared = 0.7140
Total | 1.1170e+11 52 2.1480e+09 Root MSE = 24784
------------------------------------------------------------------------------
chic | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
egg |
L1 | -4.32139 3.933252 -1.099 0.277 -12.22156 3.57878
chic |
L1 | .8349305 .075617 11.042 0.000 .6830493 .9868117
_cons | 88951.72 40384.25 2.203 0.032 7837.569 170065.9
------------------------------------------------------------------------------
test L.egg
( 1) L.egg = 0.0
F( 1, 50) = 1.21
Prob > F = 0.2772
Are those numbers similar to those you have obtained using R?
Do that for the for lags 1,2,3, and 4. Please provide a table in the same format of Thurman and Fisher's (1988), containing your results, plus a graphical analysis.
Causality in further lags: To test Granger causality in further lags, the procedures are the same. Just remember to test the joint hypothesis of non-significance of the "causality" terms.
Example: Do eggs Granger cause chickens (in four lags)?
regress chic L.egg L2.egg L3.egg L4.egg L.chic L2.chic L3.chic L4.chic
Source | SS df MS Number of obs = 50
---------+------------------------------ F( 8, 41) = 22.75
Model | 8.9451e+10 8 1.1181e+10 Prob > F = 0.0000
Residual | 2.0154e+10 41 491569158 R-squared = 0.8161
---------+------------------------------ Adj R-squared = 0.7802
Total | 1.0961e+11 49 2.2369e+09 Root MSE = 22171
------------------------------------------------------------------------------
chic | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------+--------------------------------------------------------------------
egg |
L1 | 87.38472 26.87471 3.252 0.002 33.11014 141.6593
L2 | -62.49408 41.76817 -1.496 0.142 -146.8466 21.85845
L3 | -8.214513 44.09684 -0.186 0.853 -97.26989 80.84086
L4 | -22.63552 30.59828 -0.740 0.464 -84.43 39.15897
chic |
L1 | .2332566 .1934323 1.206 0.235 -.1573878 .623901
L2 | .45797 .2039095 2.246 0.030 .0461663 .8697736
L3 | -.0184877 .2059394 -0.090 0.929 -.4343907 .3974153
L4 | .0256691 .1779262 0.144 0.886 -.3336602 .3849984
_cons | 147330.3 46385.32 3.176 0.003 53653.2 241007.3
------------------------------------------------------------------------------
and then test the joint significance of all lags of eggs
test L.egg L2.egg L3.egg L4.egg
( 1) L.egg = 0.0
( 2) L2.egg = 0.0
( 3) L3.egg = 0.0
( 4) L4.egg = 0.0
F( 4, 41) = 4.26
Prob > F = 0.0057
... "
0 comments:
Post a Comment