RATS 10.1
RATS 10.1

Paper Replications /

Kilian Vigfusson QE 2011

Home Page

← Previous Next →

These are files to replicate Kilian & Vigfusson(2011). This uses an "asymmetric VAR", which uses different lag coefficients for positive and negative values of the two dependent variables. Note that this is not the same as a "threshold VAR" (such as in Balke(2000)), which has the entire VAR switch under control of a threshold condition. An asymmetric VAR is linear in the observables (and so is easy to estimate); it's only in doing forecasts or impulse responses that the need for plus and minus versions of the variables complicate things.

 

Defining \(x_t^ +   = \max (x_t ,0)\), the model for GDP growth (\(y\)) using the change in the real price of oil (\(x\)) as an explanatory variable is

\begin{equation} y_t = b_{20} + \sum\limits_{i = 0}^p {b_{2,i} x_{t - i} } + \sum\limits_{i = 1}^p {b_{2,2} y_{t - i} } + \sum\limits_{i = 0}^p {g_{2,i} x_{t - i}^ + } + \varepsilon _{2t} \end{equation}

where the equation for \(x\) itself is a conventional VAR equation

\begin{equation} y_t = b_{20} + \sum\limits_{i = 0}^p {b_{2,i} x_{t - i} } + \sum\limits_{i = 1}^p {b_{2,2} y_{t - i} } + \sum\limits_{i = 0}^p {g_{2,i} x_{t - i}^ + } + \varepsilon _{2t} \end{equation}

The data are read in and transformed with
 

open data "kvqedata.rat"

calendar(q) 1973:1

data(format=rats,compact=last) 1973:01 2007:4 urate cpi pgas cgas poil gdp

*

set rpoil  = log(poil/cpi)

*

set drpoil = 100.0*(rpoil-rpoil{1})

set dgdp   = 100.0*log(gdp/gdp{1})

 

The model is run with quarterly data, but the price of oil and the CPI (which is used to deflate the price of oil) are monthly in the source data. Those are both compacted to quarterly by using the last-month-of-quarter values.
 

The following is used so the remainder of the code can be written in the x, y notation used throughout the paper.

 

set x     = drpoil

set y     = dgdp

set xplus = %plus(x)

 

Note that this model uses a recursive structure, including current energy price growth and +'ed energy price growth as explanatory variables in the GDP equation so the current energy price shock has an impact response on GDP.

 

This defines and estimates the two equations (output). Note that you can't use any of the standard VAR instructions since this has a non-standard form. The estimated standard error of the oil price equation is saved for later scaling of responses.

 

linreg(define=xeq) x / ux

# constant x{1 to p} y{1 to p}

compute sigmax=sqrt(%sigmasq)

*

linreg(define=yeq) y / uy

# constant x{0 to p} y{1 to p} xplus{0 to p}


 

FIGURE6.RPF

does the bootstrap calculations in Figure 6. The inner part of the DO I... loop are the calculations for a single "delta".  Note well that the responses are all re-scaled to a common size—due to asymmetry the response to a 10 standard deviation shock will not be 10 times the response to a one-standard deviation shock, but by rescaling, you will get an idea as to the difference in the shape of the response due to the non-linearity.
 

WALDTEST.RPF

does the parametric test statistics for symmetry (bottom line in their Table 2).

 

IRFTEST.RPF

does the test for symmetry as described in the paper. However, the test is based upon a three layer bootstrapping operation, and is subject to rather considerable simulation error. How many of each layer of the bootstrap are needed for more reliable results is an open question.

 

Output

Linear Regression - Estimation by Least Squares

Dependent Variable X

Quarterly Data From 1974:04 To 2007:04

Usable Observations                       133

Degrees of Freedom                        120

Centered R^2                        0.0745593

R-Bar^2                            -0.0179848

Uncentered R^2                      0.0751018

Mean of Dependent Variable        0.347456872

Std Error of Dependent Variable  14.400800018

Standard Error of Estimate       14.529720479

Sum of Squared Residuals         25333.533264

Regression F(12,120)                   0.8057

Significance Level of F             0.6440519

Log Likelihood                      -537.8129

Durbin-Watson Statistic                1.9857

 

    Variable                        Coeff      Std Error      T-Stat      Signif

************************************************************************************

1.  Constant                      0.623640744  2.535198118      0.24599  0.80610799

2.  X{1}                          0.017735801  0.091334532      0.19419  0.84635934

3.  X{2}                         -0.059232506  0.089866196     -0.65912  0.51108227

4.  X{3}                          0.074683153  0.083495254      0.89446  0.37286642

5.  X{4}                          0.011066654  0.083575876      0.13241  0.89487825

6.  X{5}                         -0.189083490  0.084624670     -2.23438  0.02730982

7.  X{6}                         -0.046915846  0.086247628     -0.54397  0.58747358

8.  Y{1}                          0.807463293  1.756076130      0.45981  0.64648381

9.  Y{2}                         -0.330610406  1.817816667     -0.18187  0.85598985

10. Y{3}                         -1.650517697  1.781616633     -0.92642  0.35608941

11. Y{4}                          1.295666714  1.787671113      0.72478  0.46999840

12. Y{5}                         -0.027470402  1.751231391     -0.01569  0.98751068

13. Y{6}                         -0.341507679  1.687333527     -0.20239  0.83995077


 

Linear Regression - Estimation by Least Squares

Dependent Variable Y

Quarterly Data From 1974:04 To 2007:04

Usable Observations                       133

Degrees of Freedom                        112

Centered R^2                        0.2046438

R-Bar^2                             0.0626159

Uncentered R^2                      0.5929210

Mean of Dependent Variable       0.7500324284

Std Error of Dependent Variable  0.7708809340

Standard Error of Estimate       0.7463560971

Sum of Squared Residuals         62.389311450

Regression F(20,112)                   1.4409

Significance Level of F             0.1183446

Log Likelihood                      -138.3813

Durbin-Watson Statistic                2.0344

 

    Variable                        Coeff      Std Error      T-Stat      Signif

************************************************************************************

1.  Constant                      0.655296895  0.206642301      3.17117  0.00195900

2.  X                             0.005530315  0.008370502      0.66069  0.51016719

3.  X{1}                          0.001896853  0.008577842      0.22113  0.82539067

4.  X{2}                          0.002803380  0.008535046      0.32846  0.74318083

5.  X{3}                          0.004370682  0.008352495      0.52328  0.60181416

6.  X{4}                         -0.007411788  0.008211802     -0.90258  0.36868723

7.  X{5}                         -0.001273895  0.008246634     -0.15447  0.87751360

8.  X{6}                         -0.017323984  0.008186890     -2.11606  0.03655463

9.  Y{1}                          0.215979940  0.092479370      2.33544  0.02130095

10. Y{2}                          0.070551492  0.095114330      0.74175  0.45978865

11. Y{3}                         -0.008005850  0.093317334     -0.08579  0.93178521

12. Y{4}                         -0.009457794  0.093277306     -0.10139  0.91941870

13. Y{5}                          0.011336863  0.090333227      0.12550  0.90035235

14. Y{6}                          0.017336441  0.087495877      0.19814  0.84329465

15. XPLUS                        -0.010059189  0.013431786     -0.74891  0.45548186

16. XPLUS{1}                     -0.011579641  0.013685095     -0.84615  0.39927337

17. XPLUS{2}                     -0.006986310  0.013766762     -0.50748  0.61281829

18. XPLUS{3}                     -0.013385637  0.012180307     -1.09896  0.27414345

19. XPLUS{4}                     -0.006359294  0.012057710     -0.52740  0.59895570

20. XPLUS{5}                      0.000354188  0.011890764      0.02979  0.97629007

21. XPLUS{6}                      0.024565076  0.011734988      2.09332  0.03857809


 


Copyright © 2025 Thomas A. Doan