Page 6 of 11

Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's

Posted: Thu Mar 31, 2016 2:38 am
by falcon223
Dear Tom,

is there any way this can be done .

Thanks again.

Best regards
Rosen

Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's

Posted: Thu Mar 31, 2016 3:15 am
by falcon223
Dear Tom,

Is it ok if I do my counterfactual simulation the following way;

@MSSysRegSetModel(regime=1)
compute mixmask=||1.0,0.0,0.0,1||
compute mixonly=factor*%diag(mixmask)*inv(factor)
dec vect[series] mixshocks(4)
do t=gstart,gend
compute %pt(mixshocks,t,mixonly*%xt(vresids,t))
end do t
*
forecast(paths,from=gstart,to=gend,model=MSSysRegModel,results=withshocks)
# mixshocks
set mix1 = withshocks(1)
set gap = mix-mix1



@MSSysRegSetModel(regime=2)
compute mixmask1=||1.0,0.0,0.0,1||
compute mixonly1=factor*%diag(mixmask1)*inv(factor)
dec vect[series] mixshocks(4)
do t=gstart,gend
compute %pt(mixshocks,t,mixonly*%xt(vresids,t))
end do t
forecast(paths,from=gstart,to=gend,model=MSSysRegModel,results=withshocks)
# mixshocks
set mix2 = withshocks(1)
set gap2 = mix-mix2

Now I get two series Mix1 (for regime1) and Mix 2 for (regime 2) . A
As I know the turning points from the VAR , I was thinking i can construct the series by using 'mix1' for regime1 dates and 'mix2' for regime 2 periods.
Do you think this will be okay.

Thanks again
Rosen

Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's

Posted: Thu Mar 31, 2016 9:20 pm
by TomDoan
falcon223 wrote:Dear Tom,

is there any way this can be done .

Thanks again.

Best regards
Rosen
Probably not. Some things don't translate from fixed models to MS models.

Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's

Posted: Fri Apr 15, 2016 1:38 pm
by falcon223
Dear Tom,

I am trying to run the run a 3 variable model. I am using the Bayesian method . Instead of using the variances I want to use the coefficients matrix to identify the regimes.

I do the following;

ewise voil(i)=betasys(i)(2,2)
compute swaps=%index(voil)
if swaps(1)==2


Do I have to change any thing else.

Thanks.

Best regards,
Rosen

Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's

Posted: Fri Apr 15, 2016 2:13 pm
by TomDoan
You might want to change the name from voil to something more descriptive, but that's what you would need to force labeling on the 2nd coefficient in the 2nd equation.

Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's

Posted: Thu Sep 29, 2016 9:47 pm
by istiak
Hi Tom,
I am using a two variable model with X and Y. I want the graphs of the response on X only when there is a shock in Y in both the regimes. I used the following code

@MCProcessIRF(model=MSSysRegModel,lower=lower,upper=upper,irf=irf)
spgraph(vfields=1,hfields=2,$
xlabels=||"Regime 1","Regime 2"||,ylabels=||"X","Y"||)
if var=1
table(noprint) / lower(var,3) upper(var,4) lower(var,3) upper(var,4)
do shock=3,4
graph(row=var,col=shock-4,max=%maximum,min=%minimum,nodates) 3
# irf(var,shock)
# lower(var,shock) / 2
# upper(var,shock) / 2
end do shock
end do var
spgraph(done)

But I get the message

Subscripting Error. Had Array Reference with (INTEGER). Needed (INTEGER,INTEGER)
## SX27. Illegal Combination of Data Types for Operation
>>>>int) / lower(var,3)<<<<

How the problem can be solved? Thank you so much..

Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's

Posted: Fri Sep 30, 2016 9:43 am
by TomDoan
I don't know what you are planning with:

if var=1

but that's the wrong syntax for an IF instruction (it should be var==1), and var doesn't seem to be defined anyway. Perhaps you intended

do var=1,1

Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's

Posted: Tue Jan 24, 2017 9:35 pm
by adrangi
Hi Tom. I've run EEV regime -dependent IRFs before as you can tell from our exchanges on the forum. I've tried it again and get the following error message right off the bet. Hadn't seen this in the past attempts.

## CP18. VARLAGSELECT is not the Name of a PROCEDURE. (Did you forget to SOURCE?)
>>>>@varlagselect(<<<<

It tire to look for it in the directory for the Data. I don't have it there and hadn't needed to do this. I tried it on my old 8.3 version (the one I'd run this on) as well, the same message. Any ideas? I suppose I can go find the procedure and put it in the directory, but this may be signaling other issues. Thanks for any help. Best, Bahram

Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's

Posted: Wed Jan 25, 2017 11:05 am
by TomDoan
You must have your procedure directory pointing to a location that doesn't exist any longer. Change that on the directories tab of the Preferences.

Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's

Posted: Wed Jan 25, 2017 5:14 pm
by adrangi
Hi Tom. Thanks. That comment helped. Now I seem to get bogged down on Gibbs Sampling. I can see the progress report and once got up to 87% completed, then it just got stuck there. Any suggestions on moving things along? Thanks much. Bahram

Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's

Posted: Wed Jan 25, 2017 8:22 pm
by TomDoan
Is this the EEV model, or your own?

Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's

Posted: Wed Jan 25, 2017 8:47 pm
by adrangi
Hi again. Also, Is there a way of doing Gibbs sampling on "silent Mode." I get thousands of lines of sampling output. Much appreciated. Barham

Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's

Posted: Wed Jan 25, 2017 9:05 pm
by adrangi
Hi. I ran it again, this time on my version 8.3. I got the MCMC estimates of the probabilities but not the IRFs. Instead I got the following error message.

## SR6. Missing a Necessary Parameter. Check Instruction Syntax
The Error Occurred At Location 253, Line 5 of loop/block

Not sure what I'm missing. Any suggestions are appreciated. Thanks much. Barham

Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's

Posted: Wed Jan 25, 2017 11:36 pm
by TomDoan
adrangi wrote:Hi again. Also, Is there a way of doing Gibbs sampling on "silent Mode." I get thousands of lines of sampling output. Much appreciated. Barham
See the thread starting at https://estima.com/forum/viewtopic.php?p=10414

Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's

Posted: Fri Jan 27, 2017 12:57 am
by adrangi
Hi Tom. I'm still struggling with the EEV. I modified EEV for my 5- variable model. Please see below the part that I think causes the problem. Gibbs sampling works and I get the MCMC estimates of the probabilities of two regimes. Then I get the follwoing error message and no IRF graphs. Not sure what the missing card is. Any help to get me unstuck will be highly appreciated. Thanks much.

"## SC1. Expected Supplementary Card (# ....) Here
>>>>s<<<<"

@MCProcessIRF(model=MSSysRegModel,lower=lower,upper=upper,irf=irf)
spgraph(footer="Responses to CRUDE OIL Shock",vfields=5,hfields=2,$
xlabels=||"Regime 1","Regime2 "||,ylabels=||"BLOSMX",$
"IBOvbz","IPSACH ","MERVALAG","CRUDEOIL"||)
do var=1 , 5
table(noprint) / lower(var,5) upper(var,5) lower(var,6) upper(var,6)
do shock=5,6
graph(row=var,col=shock-4,max=%maximum,min=%minimum,nodates) 5
# irf(var,shock)
# lower(var,shock) / 2
# upper(var,shock) / 2
end do shock
end do var
spgraph(done)