Identifying VARs with sign restrictions

Questions and discussions on Vector Autoregressions

Re: Identifying VARs with sign restrictions

Postby bearlotus » Wed Oct 07, 2009 11:26 am

Dear Tom:
I am following the sign restriction code of identifying multiple shocks simultaneously. But as you can see from the attached code and data, it works well for identifying two shocks, but does not work when I want to identify three shocks. I am wondering if there is something wrong with the restrictions I impose or some other things not work properly?
Has anyone who want to identify more than two shocks meet this kind of problem?
Also, it seems it matters as to which shock is first identified. If so, is there any rule about what kind of shocks should be identified first?
I would appreciate any advice from you. Thanks a lot!
Lian
Attachments
US1.xls
data
(53.5 KiB) Downloaded 272 times
three shocks.PRG
Identify three shocks
(14.54 KiB) Downloaded 284 times
two shocks.PRG
Identify two shocks
(11.02 KiB) Downloaded 277 times
bearlotus
 
Posts: 10
Joined: Thu Sep 24, 2009 9:27 am
Location: University of North Florida

Re: Identifying VARs with sign restrictions

Postby TomDoan » Wed Oct 07, 2009 1:21 pm

anlian wrote:Dear Tom:
I am following the sign restriction code of identifying multiple shocks simultaneously. But as you can see from the attached code and data, it works well for identifying two shocks, but does not work when I want to identify three shocks. I am wondering if there is something wrong with the restrictions I impose or some other things not work properly?
Has anyone who want to identify more than two shocks meet this kind of problem?
Also, it seems it matters as to which shock is first identified. If so, is there any rule about what kind of shocks should be identified first?
I would appreciate any advice from you. Thanks a lot!
Lian


It looks as if you're not doing anywhere near enough subdraws. You have to remember that this is blindly picking directions in 7-space. If you're lucky, you'll get a draw which meets your first criterion about 10% of the time. With n2=500, that means that you have only about 50 shots at picking the other two directions. Try something more like n2=5000 or n2=10000. The subdraws don't take that long.
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm

Re: Identifying VARs with sign restrictions

Postby bearlotus » Wed Oct 07, 2009 1:41 pm

[/quote] It looks as if you're not doing anywhere near enough subdraws. You have to remember that this is blindly picking directions in 7-space. If you're lucky, you'll get a draw which meets your first criterion about 10% of the time. With n2=500, that means that you have only about 50 shots at picking the other two directions. Try something more like n2=5000 or n2=10000. The subdraws don't take that long.[/quote]

Dear Tom:
I dodn't think the problem is the number of subdraws, I tried n2=500000, but it quickly gives me the error message:
## MAT13. Store into Out-of-Range Matrix or Series Element
The Error Occurred At Location 0151 of %SVDZEROS
Line 14 of %SVDZEROS
Line 47 of FORCEDFACTOR
Line 45 of loop/block
So does it mean the program can only work for identifying two shocks? Also it seems if I reverse the order of the two shocks that is identified, the results will differ. Would you please explain why this will happen?
Thank you so much for your helps,
Lian
bearlotus
 
Posts: 10
Joined: Thu Sep 24, 2009 9:27 am
Location: University of North Florida

Re: Identifying VARs with sign restrictions

Postby TomDoan » Wed Oct 07, 2009 4:17 pm

Doing (potentially) millions of singular value decompositions revealed a minor problem in the %SVDECOMP function. The attached revision to the forcedfactor procedure will take care of that. You might also want to look at Todd Clark's code for doing the Rubio-Waggoner-Zha approach.

forcedfactor.src
(4.97 KiB) Downloaded 302 times
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm

Re: Identifying VARs with sign restrictions

Postby bearlotus » Thu Oct 08, 2009 8:13 am

Dear Tom:
Thank you very much! It is great help!
Lian

TomDoan wrote:Doing (potentially) millions of singular value decompositions revealed a minor problem in the %SVDECOMP function. The attached revision to the forcedfactor procedure will take care of that. You might also want to look at Todd Clark's code for doing the Rubio-Waggoner-Zha approach.

forcedfactor.src
bearlotus
 
Posts: 10
Joined: Thu Sep 24, 2009 9:27 am
Location: University of North Florida

Re: Identifying VARs with sign restrictions

Postby smallick » Tue Oct 20, 2009 11:03 am

Dear RATS user,
I like your code which allows one to calculate cumulative responses and the multiplier as in Mountford and Uhlig (2009). When I try to integrate your additional bits into the replication code for MU (made available by Estima under resources), I cannot get these extra codes to run without error.
I would be grateful for your time if you can send me the steps for how to adapt the bits on cumulative responses and the multiplier to the newest version of the replication code that is currently available under resources.
Many thanks
Sushanta
http://webspace.qmul.ac.uk/skmallick/
MC128 wrote:Dear Tom,

Thank you so much for correcting my codes!....I am now trying to adjust the code to calculate the impulse responses of the model subject to a restricted 1% shock to revenue. I then move on to calculate the cumulative response and the multiplier....the shape of the responses seem very similar to those in Mountford and Uhlig (2008). but somehow the mean response of multiplier is a bit weird....Is this normal? (for your information, I follow closely the GUASS codes of Mountford and Uhlig (2008), available at the website of journal of applied econometrics)

Again, many thanks!

MC
smallick
 
Posts: 2
Joined: Tue Oct 20, 2009 5:16 am

Re: Identifying VARs with sign restrictions

Postby MC128 » Tue Oct 20, 2009 8:46 pm

Hi,

Here is my adaptation to the latest version of Mountford and Uhlig code. You need to change some of the input, like the the source programme for the VAR, the variables restricted etc......the numbers in the calculation of multipliers are the sample ratio of fiscal variables and GDP.

Hope it help.

MC
Attachments
fiscalshocks(sr)b.prg
(9.76 KiB) Downloaded 279 times
MC128
 
Posts: 36
Joined: Tue Jun 16, 2009 5:55 am

Re: Identifying VARs with sign restrictions

Postby TL » Fri Oct 23, 2009 11:48 am

Dear Tom,

I would like to add dummy variables for the period of the Asian crisis, from Oct 97 to Sep 98.

With the series ‘DUMMY’ that is 0 during such period,

Code: Select all
OPEN DATA Zero_Crisis_Dummy_All_4_South_Korea.xls
    CALENDAR 1989 2 12
    compute missc=1.0e+32
    data(format=xlS,org=columns) 1989:2 2008:11 CPI Y INT SS FF PP DUMMY

    set CPI = (CPI*100.0)*DUMMY
    set Y   = (Y*100.0)*DUMMY
    set SS  = (SS*100.0)*DUMMY
    set FF  = (FF*100.0)*DUMMY
    set PP  = (PP*100.0)*DUMMY
    set INT = (INT)*DUMMY
    *
    system(model=varmodel)
    variables Y CPI INT PP FF SS
    lags 1 to 6
    deterministic constant DUMMY
    end(system)
    estimate(noprint,resid=resids)


I am not sure if that code is correct or not. Could you please give me suggestions?

Thank you very much for your help and kindness.

Sincerely,

Tim
Attachments
To_Forum_23Oct.txt
(12.23 KiB) Downloaded 213 times
Last edited by TL on Mon Feb 01, 2010 10:33 am, edited 1 time in total.
TL
 
Posts: 28
Joined: Thu Oct 02, 2008 9:58 am

Re: Identifying VARs with sign restrictions

Postby TomDoan » Fri Oct 23, 2009 12:35 pm

I'm not sure what you're trying to do with the dummies. You've zeroed out your data during that period, but those will still be, for instance, lags for the post dummy data, which will really distort your results. If you want to skip that entirely, use a SMPL option.
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm

Re: Identifying VARs with sign restrictions

Postby smallick » Fri Oct 23, 2009 2:37 pm

Hello! thank you very much for your help.
I have one quick question. Could you pl let me know why you have put (2-1) in the revenue multiplier and (1-1) in the expenditure multiplier in the steps below:

compute mult1(draw)(m) = %%Impplc(draw)(1+(1-1)*nvar,m)/(%%Impplc(draw)(2+(1-1)*nvar,m)*0.142)
compute mult2(draw)(m) = -%%Impplc(draw)(1+(2-1)*nvar,m)/(%%Impplc(draw)(3+(2-1)*nvar,m)*0.138)

Is this impact multiplier or present value multiplier? If it is impact multiplier, I am just wondering why the numbers (0.142 and 0.138) are used in the above calculation. If they are discount factors, could you please give me some hint how you calculated it.
I will appreciate your reply very much.
Regards
Sushanta
s.k.mallick@qmul.ac.uk
MC128 wrote:Hi,

Here is my adaptation to the latest version of Mountford and Uhlig code. You need to change some of the input, like the the source programme for the VAR, the variables restricted etc......the numbers in the calculation of multipliers are the sample ratio of fiscal variables and GDP.

Hope it help.

MC
smallick
 
Posts: 2
Joined: Tue Oct 20, 2009 5:16 am

Re: Identifying VARs with sign restrictions

Postby MC128 » Fri Oct 23, 2009 3:06 pm

Hi,

The formula corresponds to the present value multiplier. The (2-1) indicate that it is the second policy experiment, which is the deficit financed tax cut....
The (1-1) indicate that is the first policy experiment, which is the deficit financed expenditure increase.

Please let me know if you find some mistake in the calculation.

MC
MC128
 
Posts: 36
Joined: Tue Jun 16, 2009 5:55 am

Re: Identifying VARs with sign restrictions

Postby TL » Mon Oct 26, 2009 11:05 am

Dear Tom,

Thank you very much for your reply.

I would like to include dummy variable (exogenous control) for the period of the Asian crisis in the VAR model using sign restrictions.

The dummy variable takes a value of 1 for that period of Asian financial crisis (Oct 97 – Sep 98) and 0 otherwise.

In order to perform this, is it correct to just add the dummy variable at the DETERMINISTIC instruction?

Code: Select all
    system(model=varmodel)
    variables Y CPI INT PP FF SS
    lags 1 to 6
    deterministic constant DUMMY
    end(system)
    estimate(noprint,resid=resids)


Thank you very much for your help and kindness.

Sincerely,

Tim
Attachments
To_Forum_26Oct.txt
(12.16 KiB) Downloaded 219 times
Last edited by TL on Mon Feb 01, 2010 10:34 am, edited 1 time in total.
TL
 
Posts: 28
Joined: Thu Oct 02, 2008 9:58 am

Re: Identifying VARs with sign restrictions

Postby TomDoan » Mon Oct 26, 2009 11:13 am

TL wrote:Dear Tom,

Thank you very much for your reply.

I would like to include dummy variable (exogenous control) for the period of the Asian crisis in the VAR model using sign restrictions.

The dummy variable takes a value of 1 for that period of Asian financial crisis (Oct 97 – Sep 98) and 0 otherwise.

In order to perform this, is it correct to just add the dummy variable at the DETERMINISTIC instruction?

Code: Select all
    system(model=varmodel)
    variables Y CPI INT PP FF SS
    lags 1 to 6
    deterministic constant DUMMY
    end(system)
    estimate(noprint,resid=resids)


Thank you very much for your help and kindness.

Sincerely,

Tim


You're not really answering the question about what you want the dummy to do. If you add the dummy as indicated, you're saying that you want a shift to the intercept (only) during that period. That's a single shift for the entire period and the lag coefficients stay the same. Is that what you want?
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm

Re: Identifying VARs with sign restrictions

Postby TL » Mon Oct 26, 2009 3:08 pm

Dear Tom,

Thank you very much for your reply.

I understand that that is what literature does (to include a discrete intercept dummy variable). However, would it be possible to also have a change in the lag coefficients?

I am sorry for not answering the question about what I want the dummy to do. Essentially, I am following literature, capturing an effect of the crisis through an introduction of the crisis dummy.

Thank you very much for your help and kindness.

Sincerely,

Tim
TL
 
Posts: 28
Joined: Thu Oct 02, 2008 9:58 am

Re: Identifying VARs with sign restrictions

Postby TomDoan » Mon Oct 26, 2009 4:26 pm

TL wrote:Dear Tom,

Thank you very much for your reply.

I understand that that is what literature does (to include a discrete intercept dummy variable). However, would it be possible to also have a change in the lag coefficients?

I am sorry for not answering the question about what I want the dummy to do. Essentially, I am following literature, capturing an effect of the crisis through an introduction of the crisis dummy.

Thank you very much for your help and kindness.

Sincerely,

Tim


I'd be hard-pressed to imagine how a constant dummy shift in a VAR could somehow be the correct way to handle that. But if that's standard practice, then you have that coded correctly.

Dummying out the lag coefficients as well would be equivalent to using a SMPL which excludes that period from the sample. Note that that does not exclude the entries in the crisis period from being in the lags for entries immediately afterwards.
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm

PreviousNext

Return to VARs (Vector Autoregression Models)

Who is online

Users browsing this forum: Bing [Bot] and 1 guest