Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's
Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's
thanks.
does this mean that my problem does not have a solution in this framework? I do not see how easily i can use the function ESTIMATE to set up a VAR after the MS parameters have been estimated. could you please further help me on this?
i can put the MS parameters in the VAR tools as
compute svt1 =%decomp(inv(%nobs*sigmav(1)))
compute betaols1=betasys(1)
compute ncoef =%rows(betaols1)
compute wishdof=%nobs-ncoef
compute svt2 =%decomp(inv(%nobs*sigmav(2)))
compute betaols2=betasys(2)
but i do not know how to move from here to draw these paramters and make use of priors such as
specify(type=general,matrix=priormat,tight=.2, DECAY=1.0) 0.5
thanks for your help!
does this mean that my problem does not have a solution in this framework? I do not see how easily i can use the function ESTIMATE to set up a VAR after the MS parameters have been estimated. could you please further help me on this?
i can put the MS parameters in the VAR tools as
compute svt1 =%decomp(inv(%nobs*sigmav(1)))
compute betaols1=betasys(1)
compute ncoef =%rows(betaols1)
compute wishdof=%nobs-ncoef
compute svt2 =%decomp(inv(%nobs*sigmav(2)))
compute betaols2=betasys(2)
but i do not know how to move from here to draw these paramters and make use of priors such as
specify(type=general,matrix=priormat,tight=.2, DECAY=1.0) 0.5
thanks for your help!
Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's
Setting up the system with a prior and doing ESTIMATE is simply a quick way to generate the information needed to make the HPRIOR matrix.
Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's
thanks. how would you set up the system with a prior and do ESTIMATE?
thanks
thanks
Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's
You were describing how you would do a (non-switching) BVAR. Exactly like that.
Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's
Dear Tom,
i am trying to do FEVD after running the regime dependent impulse response. I have read your earlier post on this. Shall I write ,
compute factor=%decomp(sigmav(1))
error(noprint,model=MSSysRegModel,results=error1,steps=8,factor=factor)
It would be grateful if you can tell whether I am doing it correctly.
All the best
Rosen
i am trying to do FEVD after running the regime dependent impulse response. I have read your earlier post on this. Shall I write ,
compute factor=%decomp(sigmav(1))
error(noprint,model=MSSysRegModel,results=error1,steps=8,factor=factor)
It would be grateful if you can tell whether I am doing it correctly.
All the best
Rosen
Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's
As it said in the response to the original question, there are two locations where it computes the impulse responses. You need to insert that code in each location.
Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's
Possible, yes. Manageable is a different issue. The number of free parameters is likely almost 50% larger, plus it's less likely that a two-regime model will take care of that many dependent variables.hashemelshafie wrote:Is it possible(manageable) to expand this to 5 variables?
-
lumengobobo46
- Posts: 17
- Joined: Mon May 02, 2011 2:35 pm
Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's
Hi Tom
which line of the code should i change if i need to extend to identified VAR (structural VAR) rather than unrestricted VAR as it is the case here?
which line of the code should i change if i need to extend to identified VAR (structural VAR) rather than unrestricted VAR as it is the case here?
Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's
That's much more complicated than a single line change. For maximum likelihood (EM is out of the question) you would have to overwrite
function %MSSysRegInitVariances
...
to build the regime-specific covariance matrices from the regime-specific structural parameters for the SVAR and
nonlin(parmset=regparms) betasys sigmav
would have to have SIGMAV (which is a 2 vector of covariance matrices) would have to be replaced with the parameters for the regime-specific SVAR's.
The code for handling switching covariance matrices is complicated by the fact that the likelihood is unbounded above (a well-known problem with switching variances). Most of the code in %MSSysRegInitVariances is to prevent the covariance matrices from getting too close to singular. That would probably be even more complicated if you were dealing with an SVAR.
function %MSSysRegInitVariances
...
to build the regime-specific covariance matrices from the regime-specific structural parameters for the SVAR and
nonlin(parmset=regparms) betasys sigmav
would have to have SIGMAV (which is a 2 vector of covariance matrices) would have to be replaced with the parameters for the regime-specific SVAR's.
The code for handling switching covariance matrices is complicated by the fact that the likelihood is unbounded above (a well-known problem with switching variances). Most of the code in %MSSysRegInitVariances is to prevent the covariance matrices from getting too close to singular. That would probably be even more complicated if you were dealing with an SVAR.
Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's
Dear Tom,
After running a 3 variable markov switching var I am trying to do a f test to see whether my coefficients/intercepts are different.
I was trying to test whether betasys(1)(1,1) and betasys(2)(1,2) are different. I give the following command
restrict 1
# 1 13
# 1 -1 0
i get `## Unassigned 1411'
it works till I am testing the 1st and the 12th coefficient variable.
It will be great if you can help me . I have attached the output file.
I
After running a 3 variable markov switching var I am trying to do a f test to see whether my coefficients/intercepts are different.
I was trying to test whether betasys(1)(1,1) and betasys(2)(1,2) are different. I give the following command
restrict 1
# 1 13
# 1 -1 0
i get `## Unassigned 1411'
it works till I am testing the 1st and the 12th coefficient variable.
It will be great if you can help me . I have attached the output file.
I
- Attachments
-
- f test.docx
- (13.05 KiB) Downloaded 876 times
Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's
Are you estimating by EM? If so, you don't get a covariance matrix to let you do Wald tests---you need to at least finish it off with maximum likelihod.
You should also check how your software is installed. It's not finding the ratserrs.msg file with the executable (which is why you get the "unassigned" error message).
You should also check how your software is installed. It's not finding the ratserrs.msg file with the executable (which is why you get the "unassigned" error message).
Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's
Dear Tom,
Thanks for you reply. I am using MCMC method.
Rosen
Thanks for you reply. I am using MCMC method.
Rosen
Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's
The only thing that will give you usable Wald tests will be maximum likelihood. When you do the RESTRICT, it's trying to do a test using the last regression or whatever that actually produces the required information. That obviously has 12 coefficients.
Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's
Dear Tom,
Is it possible to obtain irf's from the MS-VAR estimated with EM algorithm like in the original paper? I run the same model with the original Ox codes, my sample covers quarterly observations for 1988-2013 period, estimation gives me completely different regime classifications with stable irfs. However Rats estimates using mcmc have only four number of observations in one of the regime.
Regards
Is it possible to obtain irf's from the MS-VAR estimated with EM algorithm like in the original paper? I run the same model with the original Ox codes, my sample covers quarterly observations for 1988-2013 period, estimation gives me completely different regime classifications with stable irfs. However Rats estimates using mcmc have only four number of observations in one of the regime.
Regards
Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's
You can do this, which will give you the IRF's in impulses1 and impulses2. However, if you're getting only four observations in one of the regimes, then it sounds like you have more of an outlier than any actual switching model.ege_man wrote:Dear Tom,
Is it possible to obtain irf's from the MS-VAR estimated with EM algorithm like in the original paper? I run the same model with the original Ox codes, my sample covers quarterly observations for 1988-2013 period, estimation gives me completely different regime classifications with stable irfs. However Rats estimates using mcmc have only four number of observations in one of the regime.
Regards
@MSSysRegSetModel(regime=1)
compute factor=%decomp(sigmav(1)),factor=factor*inv(%diag(%xdiag(factor)))
impulse(noprint,model=MSSysRegModel,results=impulses1,steps=steps,factor=factor)
*
* Save IRF's for regime 2
*
@MSSysRegSetModel(regime=2)
compute factor=%decomp(sigmav(2)),factor=factor*inv(%diag(%xdiag(factor)))
impulse(noprint,model=MSSysRegModel,results=impulses2,steps=steps,factor=factor)