Kilian and Vigfusson (2011)

Use this forum for posting example programs or short bits of sample code.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Kilian and Vigfusson (2011)

Unread post by TomDoan »

Remember that XPLUS is determined directly from X, so the impact on y from an x shock will vary depending upon both the shock and the lagged values of the system.
ManfredE
Posts: 6
Joined: Tue May 24, 2016 10:44 am

Re: Kilian and Vigfusson (2011)

Unread post by ManfredE »

Hello. I have another question about this topic. Both equations (for X and Y) are estimated with up to “p” lags. If one were to select the best “p” of the model, and since the model is non linear, would it be appropriate to select "p" based on standard lineal criteria like AIC, BIC or adjusted R^2 of the Y equation? If this is not the case, then which would be a better criteria?
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Kilian and Vigfusson (2011)

Unread post by TomDoan »

It's actually a linear model in parameters on the transformed data so you can use AIC or BIC. However, even if it were non-linear in the parameters (which it isn't), you could still use AIC or BIC if you have NLLS or NLSYSTEM estimation---AIC and BIC have nothing to do with the model being linear, just that it has a log likelihood function.
tasnim223
Posts: 13
Joined: Sat Apr 07, 2018 12:15 am

Re: Kilian and Vigfusson (2011)

Unread post by tasnim223 »

Dear Tom,

in the irf based test do you test the symmetry of 1 S.D and the 2 S.D .

Also the other thing is is it possible to generate confidence intervales for the response functions.

Mnay thanks
Rosen
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Kilian and Vigfusson (2011)

Unread post by TomDoan »

tasnim223 wrote: in the irf based test do you test the symmetry of 1 S.D and the 2 S.D .
Yes. The first column is with 1 s.d. shocks and the second is with 2 s.d.
tasnim223 wrote: Also the other thing is is it possible to generate confidence intervales for the response functions.
That's already being done---the test is using the estimated joint distribution across horizons which confidence intervals just look at each horizon separately.
tasnim223
Posts: 13
Joined: Sat Apr 07, 2018 12:15 am

Re: Kilian and Vigfusson (2011)

Unread post by tasnim223 »

Dear Tom,

In the irfbased test if I want to test 4 and 10 s.d shock symmetry what do I have to change.

Thanks in advanced.

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

Re: Kilian and Vigfusson (2011)

Unread post by TomDoan »

Before the infobox that initializes the loop:

compute [vector] scales=||4.0,10.0||

then inside the do i loop (4th layer of loops)

replace

compute delta=i*sigmax

with

compute delta=scales(i)*sigmax
TR2018
Posts: 9
Joined: Tue Nov 13, 2018 6:18 am

Re: Kilian and Vigfusson (2011)

Unread post by TR2018 »

Dear Doan,
How can I change the program codes to obtain the impulse responses (figure6) with additional explanatory variables. I mean, i would like to keep oil price (x) as it is in the code (defining censored variable for oil price only. however in my estimation system i would like to include other explanatory variables.
thank you
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Kilian and Vigfusson (2011)

Unread post by TomDoan »

I'm not sure what you mean by other "explanatory" variables? Could you be more specific about your proposed model?
TR2018
Posts: 9
Joined: Tue Nov 13, 2018 6:18 am

Re: Kilian and Vigfusson (2011)

Unread post by TR2018 »

the paper is for bivariate case. so,
set x = drpoil
set y = dgdp
ı would like to add another variable, lets say inflation dpm
then i tried to continue as below;
linreg(define=xeq) x / ux
# constant x{1 to p} y{1 to p} dpm{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} dpm{1 to p}
however i need to define new equation for dpm and the combine as a system and modify the bootstrapping part?
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Kilian and Vigfusson (2011)

Unread post by TomDoan »

Yes. Wherever there is something for Y, you would need a parallel instruction for DPM. Such as:

linreg(define=dpmeq) dpm / udpm
# constant x{0 to p} y{1 to p} xplus{0 to p} dpm{1 to p}

The one think you wouldn't need is something like

frml(identity) lydef ly = ly{1}+y

for DPM, since one assumes that you're fine with inflation being the target variable. (That identity is to convert Y, which is growth rates, to the level of output).
tasnim223
Posts: 13
Joined: Sat Apr 07, 2018 12:15 am

Re: Kilian and Vigfusson (2011)

Unread post by tasnim223 »

Dear Tom,

I am running the figure 6.rpf . How can I get the upper bound and the lower bound /or the 95% confidence interval bands for the impulse response functions. Many thanks.

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

Re: Kilian and Vigfusson (2011)

Unread post by TomDoan »

As I mentioned before, the irftest program is already doing the extra layer of bootstrapping required to do confidence intervals. The point of figure6 is to show the effects of the non-linearity, not really to more fully analyze the responses. However, as it says in the initial post, it's not at all clear how many of each level of bootstrapping is needed to get valid results. (It requires a 3 layer bootstrap---over the model as a whole, then over initial conditions, then over the data range given the bootstrapped coefficients).
tasnim223
Posts: 13
Joined: Sat Apr 07, 2018 12:15 am

Re: Kilian and Vigfusson (2011)

Unread post by tasnim223 »

Dear Tom ,

I have added a third variable to the system . However, I am getting the following ;

## FO4. Identities must come last
The Error Occurred At Location 900, Line 30 of loop/block

I have attached the file and the data set.
It would be great if you have a look.

Many thanks again.

Tasnim
Attachments
kvqedata.rat
data
(21 KiB) Downloaded 1091 times
3 variable.RPF
(4.57 KiB) Downloaded 1119 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Kilian and Vigfusson (2011)

Unread post by TomDoan »

You're not getting too far with this definition of inflation:

set inf = log(cpi)
set dinf = 100*log(inf-inf{1})

as that will have logs of negative values.

As the message says, you have to list the identities last. Put zeq before the lydef:

group asymmvar xeq xplusdef yeq zeq lydef
Post Reply