Question about Bayesian simulation

Dear all:
I am trying to do the Bayesian estimation for my model, I simulate for 100,000 times and from the results, I got the posterior mean and etc. But is there any way I can get the whole series of the draws?
I might need the whole distribution of the parameters.
thanks for your help

Cindy

Dear Cindy,

the Metropolis parameters draws are stored in the mh.mat files. In that files, matrix x2 contains the parameters draws as rows.
The order is as follows:

  1. stderr of exogenous shocks
  2. stderr of measurement errors if any
  3. correlation of exogenous shocks if any
  4. correlation of measurement errors if any
  5. model coefficients

Inside each category, parameters are ordered in the declaration order in the estimated_params block

As it is supposed to be with Metropolis iterations, parameters values are repeated when the algorithm decides not to jump

Best wishes

Michel

thanks for the fast response.

How are the parallel chains organised in the sequence of _mhXXX.mat files? Since the burnin sections should all be in the first part of the mat files, the chains cannot be ordered only in sequence, I should think.

[quote=“arnedam”]

How are the parallel chains organised in the sequence of _mhXXX.mat files? Since the burnin sections should all be in the first part of the mat files, the chains cannot be ordered only in sequence, I should think.[/quote]

The different chains are stored into different files. If you look inside the folder of your mod file after the bayesian estimation you will find files like:

<NAME_OF_YOUR_MOD_FILE>_mhX_blckY.mat

where Y = 1,2 (by default we run two parallel chains) gives the chain number.

St

Got it, thanks. Turns out we were running only one block which caused my confusion.