Dear all,

I am currently working on a replication of a paper where i should use a markov switching SBVAR, estimate it and compare models with marginal data densities.

The code structure is:

ms_estimation(datafile=testv016

,freq=4

,initial_year=1970

,final_year=2009

,nlags=4

,max_repeated_optimization_runs=1

,max_number_of_stages=0

);

ms_simulation(mh_replic=1000);

ms_compute_mdd;

The code is fine finding estimates of A0 and A+ however for the MDD part i am getting the following error. What should be the possible reason of it?

MS-SBVAR Marginal Data Density

Unable to open est_final_testv016.out

Processing posterior draws

Matrix not positive definite.

Thanks,