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?

I think they are reporting the unconditional IRFs. I’d love to know how to get the conditional ones!

You can recover the matrix A(st) and F(st) from est_final_file.out to compute the IRFs.

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(variances, chain=1);


est_final_test_ms_variances.txt (100 KB)

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.


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

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);

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.

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=??,
  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
  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.