Page 1 of 1
MS-SBVAR
Posted:
Sun Jan 05, 2014 9:57 am
by romain
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
Re: MS-SBVAR
Posted:
Sun Jan 05, 2014 11:30 pm
by Alex_Co
I think they are reporting the unconditional IRFs. I'd love to know how to get the conditional ones!
Cheers
Re: MS-SBVAR
Posted:
Tue Jan 07, 2014 7:46 am
by StephaneLhuissier
You can recover the matrix A(st) and F(st) from est_final_file.out to compute the IRFs.
Re: MS-SBVAR
Posted:
Tue Jan 07, 2014 1:59 pm
by romain
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);
Re: MS-SBVAR
Posted:
Fri Jan 10, 2014 10:33 am
by StephaneLhuissier
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
Re: MS-SBVAR
Posted:
Fri Jan 10, 2014 10:50 am
by romain
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
Re: MS-SBVAR
Posted:
Fri Jan 10, 2014 3:23 pm
by StephaneLhuissier
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);
Re: MS-SBVAR
Posted:
Fri Jan 10, 2014 5:01 pm
by romain
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.
Re: MS-SBVAR
Posted:
Fri Jan 17, 2014 8:57 pm
by aioliayn
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
Re: MS-SBVAR
Posted:
Wed Jan 22, 2014 7:48 pm
by StephaneLhuissier
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