## TA: Nicolas Bottan

Welcome to a new issue of e-Tutorial. This issue focuses on time series models, with special emphasis on the tests of Granger causality. We would like to remark that the theoretical background given in class is essential to proceed with the computational exercise below. Thus, I recommend you to study Prof. Koenker’s Lectures Note 9 as you go through the tutorial.1

# Data

The first thing you need is to download the data in text format from the Econ 508 web site. Save it in your preferred directory and open the data:

  cd "Your working directory"  insheet using eggs.csv, clear

The next step is to declare chickens and eggs as time series:

  tsset year 

# Granger Causality

In problem set 3 you will be asked to replicate the results of Thurman and Fisher’s (1988), Table 1. I recommend you to sketch the Granger test, explain the NULL and the ALTERNATIVE hypotheses, and run the test for the causality for all lags, and both directions. At each round, collect the F-test statistics, p-values, and R-squares. At the end, please provide a table in the same format of Thurman and Fisher’s (1988), containing your results, along with a graphical analysis.

Causality direction A:

  regress egg L.egg L.chic  test L.chic
      Source |       SS       df       MS              Number of obs =      74-------------+------------------------------           F(  2,    71) = 1465.37       Model |  71512182.7     2  35756091.4           Prob > F      =  0.0000    Residual |  1732454.01    71  24400.7607           R-squared     =  0.9763-------------+------------------------------           Adj R-squared =  0.9757       Total |  73244636.7    73  1003351.19           Root MSE      =  156.21------------------------------------------------------------------------------         egg |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]-------------+----------------------------------------------------------------         egg |         L1. |   .9960094     .01868    53.32   0.000     .9587625    1.033256             |        chic |         L1. |   .0000358   .0004183     0.09   0.932    -.0007983    .0008698             |       _cons |   58.52373   214.5154     0.27   0.786    -369.2079    486.2553------------------------------------------------------------------------------. test L.chic ( 1)  L.chic = 0       F(  1,    71) =    0.01            Prob > F =    0.9321
Causality direction B:

  regress chic L.egg L.chic  test L.egg
      Source |       SS       df       MS              Number of obs =      74-------------+------------------------------           F(  2,    71) =  114.49       Model |  1.0874e+11     2  5.4369e+10           Prob > F      =  0.0000    Residual |  3.3715e+10    71   474864939           R-squared     =  0.7633-------------+------------------------------           Adj R-squared =  0.7567       Total |  1.4245e+11    73  1.9514e+09           Root MSE      =   21791------------------------------------------------------------------------------        chic |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]-------------+----------------------------------------------------------------         egg |         L1. |    -.71509    2.60592    -0.27   0.785    -5.911146    4.480966             |        chic |         L1. |   .8664733   .0583501    14.85   0.000     .7501264    .9828202             |       _cons |   58691.79   29925.53     1.96   0.054    -978.0232    118361.6------------------------------------------------------------------------------.   test L.egg ( 1)  L.egg = 0       F(  1,    71) =    0.08            Prob > F =    0.7846 

Do that for lags 1,2,3, and 4, and provide a table like 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.

For 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  test L.egg L2.egg L3.egg L4.egg
      Source |       SS       df       MS              Number of obs =      71-------------+------------------------------           F(  8,    62) =   37.62       Model |  1.1548e+11     8  1.4435e+10           Prob > F      =  0.0000    Residual |  2.3794e+10    62   383766878           R-squared     =  0.8292-------------+------------------------------           Adj R-squared =  0.8071       Total |  1.3928e+11    70  1.9897e+09           Root MSE      =   19590------------------------------------------------------------------------------        chic |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]-------------+----------------------------------------------------------------         egg |         L1. |     81.087   21.69714     3.74   0.000     37.71503     124.459         L2. |  -54.45025   32.56008    -1.67   0.100    -119.5369    10.63642         L3. |  -11.29123   32.40695    -0.35   0.729     -76.0718    53.48934         L4. |  -18.27037   23.21969    -0.79   0.434    -64.68587    28.14513             |        chic |         L1. |   .3265577   .1616854     2.02   0.048     .0033533    .6497622         L2. |   .4105195   .1711699     2.40   0.019     .0683557    .7526833         L3. |  -.0341662   .1693666    -0.20   0.841    -.3727252    .3043929         L4. |   .0468076   .1472755     0.32   0.752     -.247592    .3412071             |       _cons |   111656.2   35295.11     3.16   0.002     41102.27    182210.1------------------------------------------------------------------------------. test L.egg L2.egg L3.egg L4.egg ( 1)  L.egg = 0 ( 2)  L2.egg = 0 ( 3)  L3.egg = 0 ( 4)  L4.egg = 0       F(  4,    62) =    4.47            Prob > F =    0.0031