Kilian and Vigfusson (2011)

Use this forum for posting example programs or short bits of sample code.
tasnim223
Posts: 13
Joined: Sat Apr 07, 2018 12:15 am

Re: Kilian and Vigfusson (2011)

Unread post by tasnim223 »

Dear Tom,

If I am not wrong IRFTEST tests 1 sd positive against 1sd negative and also 2 sd positive against 2 sd negative.

I was wondering if it is possible to test 1sd positive against 2sd positive (1 sd +ve shock is significantly different from lets say 2 sd +ve shock)

thanks again.

Tasnim
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Kilian and Vigfusson (2011)

Unread post by TomDoan »

I'm not sure how interesting that is. If the model is, in fact, linear, then the responses are symmetric and they also scale linearly. However, symmetry is a much more useful test of the linearity than scaling---we know that a linear VAR doesn't really predict the effect of 10x shocks.
Catife
Posts: 9
Joined: Sun Mar 20, 2016 10:18 pm

Re: Kilian and Vigfusson (2011)

Unread post by Catife »

Hi Tom,

I am wondering if

Code: Select all

linreg(define=xeq) x / ux
# constant x{1 to p} y{0 to p}
compute sigmax=sqrt(%sigmasq)
*
linreg(define=yeq) y / uy
# constant x{0 to p} y{1 to p} xplus{0 to p}
works in terms of allowing the current value of y in the x equation. I think the resulted model won't be identified, right? Thank you very much.

Regards
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Kilian and Vigfusson (2011)

Unread post by TomDoan »

That would if it were legal. It isn't---the original model can be estimated by least squares as it is recursive, but this isn't. And XPLUS{0} is a sign-restricted version of X{0} so you would end up with a simultaneous tobit type model.
Godwin
Posts: 1
Joined: Thu Aug 01, 2019 3:35 pm

Re: Kilian and Vigfusson (2011)

Unread post by Godwin »

Hi Tom;


Please, i also want to know how i can determine the lag length to be employed for the IRF based test?

Thanks.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Kilian and Vigfusson (2011)

Unread post by TomDoan »

Godwin wrote:Hi Tom;


Please, i also want to know how i can determine the lag length to be employed for the IRF based test?

Thanks.
This sets the number of steps used in the calculation:

compute h=8

You don't "determine" it; you pick it. 8 is two years in the K&V paper.
wert12
Posts: 10
Joined: Thu Nov 15, 2018 2:47 am

Confidence bands for the IRFs inKilian and Vigfusson (2011)

Unread post by wert12 »

Dear Tom and the Users,

I would be most grareful if you could share the code that enables to draw confidence bands in the IRFs of Kilian and Vigfusson (2011).

Regards;
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Kilian and Vigfusson (2011)

Unread post by TomDoan »

The IRFTEST program computes the variances of the IRF' s(and more). Tack this onto the end of that program to compute and graph the IRF's.

Code: Select all

*
* IRF's with bootstrapped confidence bands (not included in the paper).
*
set irfx 1 h = test(1)(t)
set irfy 1 h = test(2)(t)
set upperx 1 h = irfx+2.0*sqrt(sumirfsq(1)(t,t))
set uppery 1 h = irfy+2.0*sqrt(sumirfsq(2)(t,t))
set lowerx 1 h = irfx-2.0*sqrt(sumirfsq(1)(t,t))
set lowery 1 h = irfy-2.0*sqrt(sumirfsq(2)(t,t))
graph(footer="Response of X to X shock",number=0) 3
# irfx
# lowerx / 2
# upperx / 2
graph(footer="Response of Y to X shock",number=0) 3
# irfy
# lowery / 2
# uppery / 2
tasnim223
Posts: 13
Joined: Sat Apr 07, 2018 12:15 am

Re: Kilian and Vigfusson (2011)

Unread post by tasnim223 »

Dear Tom,

Hope you are fine . It would be really great if you show how we can get the 5% significance level of the IRFs obtained from the Figure6.rpf. I think this can be done by bootstrapping the impulse responses and then obtaining the pointe wise critical values (as done in Herrera and wada, 2015)

Many thanks again.

Best wishes,
Tasnim
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Kilian and Vigfusson (2011)

Unread post by TomDoan »

What would be the point of that? Figure 6 is to show the (slightly) different shapes of the standardized responses to different size shocks. Error bands would just muddle that. It makes more sense to do error bands for one shock size.
tasnim223
Posts: 13
Joined: Sat Apr 07, 2018 12:15 am

Re: Kilian and Vigfusson (2011)

Unread post by tasnim223 »

Dear Tom,

Thank you for the answer.I understand your point . It's mainly due to the referees .
Would it be possible to provide the code for the errors bands if possible.

Many thanks.

Regards,
Tasnim
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Kilian and Vigfusson (2011)

Unread post by TomDoan »

That would involve throwing the entire bootstrap-in-bootstrap loop around that analysis. But the whole idea makes no sense---the point of the graph is to show how close/far the model appears to be from linearity (If it were fully linear they would all be on top of each other). If you add error bands, they all smear together even if in every simulation you end up with that same type of pattern.
cancla
Posts: 4
Joined: Thu Sep 10, 2020 11:12 am

Re: Kilian and Vigfusson (2011)

Unread post by cancla »

Dear all,
first let me thank you for the different insights in the various replies. I'm wondering whether the Kilian and Vigfusson methodology could be applied in a VAR at levels. We know that differencing potentially integrated variables leads to misspecification; in this case it is safier to use the variables at their levels.
For instance: considering the K&V problem, we may include in the VAR the level of gdp, the level of energy price and all the observations in which the energy price increases or remains constant. In this case we could define XPLUS = max(X(t), X*(t-i)), i=1...n, with X* the peak X value in the past.
1) Do you think this kind of trasformation is correct or may not be applied to the K&V method (where we have differenced variables, but the algebra seems to have a general interpretation...)?
2) If this is possible, how shall we change the code especially in the "definitional identities" parts?

Thank you in advance.
Claudio
cancla
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Kilian and Vigfusson (2011)

Unread post by TomDoan »

cancla wrote:Dear all,
We know that differencing potentially integrated variables leads to misspecification; in this case it is safier to use the variables at their levels.
That's true only if the variables are cointegrated.
cancla wrote: For instance: considering the K&V problem, we may include in the VAR the level of gdp, the level of energy price and all the observations in which the energy price increases or remains constant. In this case we could define XPLUS = max(X(t), X*(t-i)), i=1...n, with X* the peak X value in the past.
I'm not sure what you mean by "all the observations in which the energy price increases or remains constant".
cancla
Posts: 4
Joined: Thu Sep 10, 2020 11:12 am

Re: Kilian and Vigfusson (2011)

Unread post by cancla »

Thank you for the reply.
That's true only if the variables are cointegrated.
Yes, I wanted to write "potentially cointegrated" instead "potentially integrated". Typo!
I'm not sure what you mean by "all the observations in which the energy price increases or remains constant".
Probably the best thing is to openly think about another economic problem with different variables. Suppose we have the real GDP per capita and the consumption expenditure per capita (cointegrated). Could we consider the "peak real gdp" (as the attached image displays) as the XPLUS variable in the K&V methodology to estimate the model in levels?

Concerning the K&V problem itself, I thought we may split the real energy price series following Shin et al. (2013) - "Modelling Asymmetric Cointegration and Dynamic Multipliers in a Nonlinear ARDL Framework", in terms of cumulative partial sum. I attach an excel file in which PARSUM_POS and PARSUM_NEG represent the cum. part. sum of the real energy price. In this case, could we estimate the model in levels?
Attachments
rpoil.XLSX
(28.17 KiB) Downloaded 815 times
GPD_peak.jpg
GPD_peak.jpg (79.97 KiB) Viewed 24974 times
cancla
Post Reply