MS-SBVAR

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

MS-SBVAR

Postby romain » Sun Jan 05, 2014 9:57 am

Hi all,
I would like to know for which regime the function ms_irf returns the impulse response function. In principle the IRF should be different across regimes, right?
thanks
romain
romain
 
Posts: 4
Joined: Sun Jan 05, 2014 9:49 am

Re: MS-SBVAR

Postby Alex_Co » Sun Jan 05, 2014 11:30 pm

I think they are reporting the unconditional IRFs. I'd love to know how to get the conditional ones!
Cheers
Alex_Co
 
Posts: 14
Joined: Tue Nov 05, 2013 7:34 pm

Re: MS-SBVAR

Postby StephaneLhuissier » Tue Jan 07, 2014 7:46 am

You can recover the matrix A(st) and F(st) from est_final_file.out to compute the IRFs.
Stéphane Lhuissier
CEPII
http://www.stephanelhuissier.eu
StephaneLhuissier
 
Posts: 20
Joined: Fri Oct 30, 2009 1:47 pm

Re: MS-SBVAR

Postby romain » Tue Jan 07, 2014 1:59 pm

thanks. some of these matrices have the same values across the regimes. i attach here the est_final_file.out i just got from running the following code

var R Pie Y;

varobs Y Pie R;

svar_identification;
lower_cholesky;
end;

markov_switching(chain=1,number_of_regimes=2,duration=2.5);

svar(variances, chain=1);

set_dynare_seed(5);

ms_estimation(datafile=data
,freq=4
,initial_year=1959
,final_year=2005
,nlags=4
,max_repeated_optimization_runs=1
,max_number_of_stages=0
);
ms_simulation(mh_replic=1000);
ms_compute_mdd;
ms_compute_probabilities;
ms_irf;
ms_forecast;
ms_variance_decomposition(no_error_bands);
Attachments
est_final_test_ms_variances.txt
(100.38 KiB) Downloaded 76 times
romain
 
Posts: 4
Joined: Sun Jan 05, 2014 9:49 am

Re: MS-SBVAR

Postby StephaneLhuissier » Fri Jan 10, 2014 10:33 am

In your example, you just allow the variance shocks to change over time, so the model's dynamics will not change (i.e coefficients). In consequence, the transmission mechanisms would be similar across regimes, but the size of shocks (Zeta) will be different.

Stéphane
Stéphane Lhuissier
CEPII
http://www.stephanelhuissier.eu
StephaneLhuissier
 
Posts: 20
Joined: Fri Oct 30, 2009 1:47 pm

Re: MS-SBVAR

Postby romain » Fri Jan 10, 2014 10:50 am

thanks.
how to set up a model where both the variance and coefficients will be different across the regimes and also the irfs?
thanks a lot
romain
 
Posts: 4
Joined: Sun Jan 05, 2014 9:49 am

Re: MS-SBVAR

Postby StephaneLhuissier » Fri Jan 10, 2014 3:23 pm

markov_switching(chain=1, number_of_regimes=2,duration=10);
markov_switching(chain=2, number_of_regimes=2,duration=10);
svar(coefficients, chain=1);
svar(variances, chain=2);

The first chain governs regime switches on coefficients, and the second chain (which is independent to the first one) governs regime switches on variance shocks. For more details, look at the Dynare manual.

For synchronized changes, you can do

markov_switching(chain=1, number_of_regimes=2,duration=10);
svar(coefficients, chain=1);
svar(variances, chain=1);
Stéphane Lhuissier
CEPII
http://www.stephanelhuissier.eu
StephaneLhuissier
 
Posts: 20
Joined: Fri Oct 30, 2009 1:47 pm

Re: MS-SBVAR

Postby romain » Fri Jan 10, 2014 5:01 pm

thanks. i have been able to estimate the model with the chain that combines the switch in both the variance et the coefficients. however, i still can not derive the irf of the seperate regime.
is there a way to put the options regime= and regimes of irf in order to recover these regime specific irf?
when i tried to add these options to irf it returns an error message.
romain
 
Posts: 4
Joined: Sun Jan 05, 2014 9:49 am

Re: MS-SBVAR

Postby aioliayn » Fri Jan 17, 2014 8:57 pm

Can I follow this post to ask some questions about MS-SBVAR?
1. can the MS-SVAR run discontinuous daily data (such as more than 4000 observation) and how to set the initial file (the following)?
( freq=??,
initial_year=??
final_year=??)
2. I have tried some examples using dynare, if the sample or variables are too many(more than 5 with 2 regimes), dynare can execute(run) more than 5 hours (finally I stop matlab manually), how to avoid this problem?
Hope to hear from you expert. Thank you very much indeed
aioliayn
 
Posts: 2
Joined: Thu Jan 16, 2014 6:17 pm

Re: MS-SBVAR

Postby StephaneLhuissier » Wed Jan 22, 2014 7:48 pm

1. No the MS-SBVAR code does not allow to estimate the model with discontinuous data.

2. There is nothing wrong with that. My programs run, sometimes, during several weeks. It all depends on how you set the options. See Dynare manual.

Stéphane
Stéphane Lhuissier
CEPII
http://www.stephanelhuissier.eu
StephaneLhuissier
 
Posts: 20
Joined: Fri Oct 30, 2009 1:47 pm


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 6 guests