Page 1 of 1

MS-BSVAR

PostPosted: Wed Aug 12, 2015 6:58 am
by bercerder
Hello!

Is it correct that you take into account dummies twice during estimation of markov-switching bayesian VAR: in fn_rnrprior_covres_dobs.m and in fn_rlrpostr.m (inside function ms_sbvar_setup() from ms_estimation)? It seems to me that dummies should appear only in likelihood function but not in prior. Otherwise, it's double counting.
Thank you

Re: MS-BSVAR

PostPosted: Wed Aug 12, 2015 7:36 am
by jpfeifer
According to Sims/Waggoner/Zha (2008): Methods for inference in large multiple-equation Markov-switching models the dummy observations are part of the prior, not of the likelihood. As such, they should appear in the prior and in the posterior as the posterior is likelihood times prior, where the latter includes the dummy observations.

Re: MS-BSVAR

PostPosted: Wed Aug 12, 2015 4:00 pm
by bercerder
jpfeifer wrote:According to Sims/Waggoner/Zha (2008): Methods for inference in large multiple-equation Markov-switching models the dummy observations are part of the prior, not of the likelihood. As such, they should appear in the prior and in the posterior as the posterior is likelihood times prior, where the latter includes the dummy observations.


As far as I understand, we specify dummies in such a way that it doedn't matter where we add dummies (as part of prior or part of likelihood) cause posterior unchanged. But you add them twice - in prior (here: fn_rnrprior_covres_dobs.m) and in likielihood (cause you take variable 'xtx' from output of function fn_dataxy() which calculated using dummies).

And one more question - could you please give me code of function (or whatever it is) 'ms_sbvar_command_line()'? Cause Dynare folder has only mex-files with this name.

Re: MS-BSVAR

PostPosted: Wed Oct 07, 2015 4:55 pm
by jpfeifer
We looked into this issue and Dynare's treatment is correct. You are right that using the dummy variables twice would be wrong. But the way Dynare calls fn_dataxy it will always pass
Code: Select all
indxDummy=0

thus making sure the likelihood is not affected by dummy observations, which only enter the prior.

Re: MS-BSVAR

PostPosted: Thu Oct 08, 2015 12:21 pm
by StephaneLhuissier
As a simple way to check this, look at the file init_<<name>>.dat, you can see that data (and so the likelihood) are not affected by the dummies!

There is no Matlab version for the file 'ms_sbvar_command_line'. To see how it has been built in Mex, you need to look at the C/C++ code, which is available in the source code.