Page 1 of 1
Replicating Peersman (2005) Sign Restrictions
Posted: Thu Oct 10, 2013 9:16 am
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
Re: Replicating Peersman (2005) Sign Restrictions
Posted: Fri Oct 11, 2013 10:43 am
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.
Re: Replicating Peersman (2005) Sign Restrictions
Posted: Wed Apr 09, 2014 2:12 pm
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 .
Re: Replicating Peersman (2005) Sign Restrictions
Posted: Wed Apr 09, 2014 2:56 pm
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.
Re: Replicating Peersman (2005) Sign Restrictions
Posted: Sun Apr 13, 2014 11:25 am
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 ?
Re: Replicating Peersman (2005) Sign Restrictions
Posted: Tue Apr 15, 2014 3:46 pm
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
Re: Replicating Peersman (2005) Sign Restrictions
Posted: Thu May 08, 2014 1:07 pm
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.
Re: Replicating Peersman (2005) Sign Restrictions
Posted: Thu May 08, 2014 1:19 pm
by TomDoan
You'll have to post the program as it reads now.
Re: Replicating Peersman (2005) Sign Restrictions
Posted: Fri May 09, 2014 1:34 pm
by shimarats
hi, i send my code. please run these code and tell me my problem.i wait you.thanks so much
Re: Replicating Peersman (2005) Sign Restrictions
Posted: Fri May 09, 2014 2:25 pm
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.