Replicating Peersman (2005) Sign Restrictions

If you are seeking RATS code for implementing a particular technique or replicating results from a paper, post your request here. Be sure to include complete citations for any papers or books.
dnfloro1
Posts: 9
Joined: Wed Sep 25, 2013 8:32 am

Replicating Peersman (2005) Sign Restrictions

Unread post by dnfloro1 »

Hi Tom,

I am trying to replicate Peersman (2005) "What Caused the Early Millenium Slowdown". I want to extend this 4-variable, one country VAR by adding 2 fiscal variables, (thereby identifying fiscal shocks alng with the monetary policy shocks ) and 1 variable that is BLOCK EXOGENOUS (noo feedback at all with the other variables). Also, I am new to sign restrictions and RATS in general.

My MAIN question is: How do I write-up a NEAR VAR specification for this one variable that i want to be Block exogenous in Peersman's (codes)?

best regards!

Dnfloro1
Attachments
signVAR_4v.txt
Peersman (2005) RATS code
(54.73 KiB) Downloaded 1008 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Replicating Peersman (2005) Sign Restrictions

Unread post by TomDoan »

Base your program on the Uhlig (for single shock) or Mountford-Uhlig (for multiple shocks) examples rather than this---the coding is much simpler.

Those draw VAR coefficients using standard techniques, where you can draw the covariance matrix unconditionally, and the coefficient conditional on the covariance matrix. For a near-VAR, you would the SURGibbsSetup procedures to do Gibbs sampling of the covariance matrix and coefficients. Given the draws for those, the rest of the calculations for the sign restrictions is the same.

As a first step, though, you should get the sign restrictions working with a full VAR before trying to alter it to the near-VAR.
shimarats
Posts: 31
Joined: Fri Feb 07, 2014 12:51 pm

Re: Replicating Peersman (2005) Sign Restrictions

Unread post by shimarats »

hi,

i used near -var for 10 variables , but , the matrix of A ,does not give me result for 10 variables and give me this errors .as ## MAT5. Needed Matrix with Dimensions 6 x 6, Got 10 x 10 Instead.please help me , i am confuse about this .
Attachments
egypt8.xls
(80.5 KiB) Downloaded 694 times
shimi-mixi-arab-andonesia.RPF
(28.95 KiB) Downloaded 875 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Replicating Peersman (2005) Sign Restrictions

Unread post by TomDoan »

Code: Select all

system(model=inaspsixsvar)
variables   inf ir lrgdp dlmoney dlexch
lags 1 to nlags
det constant dlawoil{1 to nlags}
det constant dlwcprice {1 to nlags}
det constant dlwfood {1 to nlags}
det constant dlusgdp{1 to nlags}
det constant usir{1 to nlags}
end(system)
You need a single DET instruction which lists all the variables. As it is, you're just overwriting the first four with the last one.
shimarats
Posts: 31
Joined: Fri Feb 07, 2014 12:51 pm

Re: Replicating Peersman (2005) Sign Restrictions

Unread post by shimarats »

i have 5 foreign variables and 5 domestic. i create DET for 10 variables but again give me errors. what i should doing ,please help me.does the near var use for 10 variables ?
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Replicating Peersman (2005) Sign Restrictions

Unread post by TomDoan »

This keeps replacing INANEARVAR with INSASPSIXVAR plus a single equation. I assume you want that to be cumulative.

Code: Select all

compute inanearvar=inaspsixsvar+awoileqn
compute inanearvar=inaspsixsvar+wcpriceeqn
compute inanearvar=inaspsixsvar+wfoodeqn
compute inanearvar=inaspsixsvar+usgdpeqn
compute inanearvar=inaspsixsvar+usmpolicyeqn
shimarats
Posts: 31
Joined: Fri Feb 07, 2014 12:51 pm

Re: Replicating Peersman (2005) Sign Restrictions

Unread post by shimarats »

hi, tanks about nearvar. i follow the last code relate to nearvar. i have found problem in matrix A in nearvar ,exactly in the section of Create the set of non-linear parameters, and the "A" formula for
* CVMODEL.
that is i identified matrix A ,but give me this error like this ## MAT5. Needed Matrix with Dimensions 6 x 6, Got 10 x 10 Instead.according to the i used 10 variable that 5 variables foreign and other 5 variables are domestic.please help me.i put matrix with error.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Replicating Peersman (2005) Sign Restrictions

Unread post by TomDoan »

You'll have to post the program as it reads now.
shimarats
Posts: 31
Joined: Fri Feb 07, 2014 12:51 pm

Re: Replicating Peersman (2005) Sign Restrictions

Unread post by shimarats »

hi, i send my code. please run these code and tell me my problem.i wait you.thanks so much
Attachments
final -mont svar.RPF
(38.1 KiB) Downloaded 905 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Replicating Peersman (2005) Sign Restrictions

Unread post by TomDoan »

You haven't fixed several of the problems that I've already pointed out. This isn't even close to being runnable as you posted it. I assume that you're jumping around and executing just parts of this, but I'm not going to figure out what works and what doesn't. Either fix the problems so "select all then run" works at least as far as your new problem, or split this up into separate programs. For instance, there's no reason for your 50 unit root tests to be in the same program as the SVAR estimates.
Post Reply