Bayesian Inference

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Bayesian Inference

Postby agupta28 » Thu Jun 12, 2008 6:29 pm

Hi,

I would like to do Bayesian Inference on some statistics based on DSGE model estimated using dynare.

In particular I would like to be able to draw and save multiple parameter estimates from the posterior distribution and estimate the policy and transition function for each one of those parameter estimates drawn from the posterior distribution.

the posterior draws for parameters are saved in mat file called mod_file_mh_blck.mat . I want to write a .m file that asks dynare to use these posterior parameter estimates and calculate the policy and transition function. Is it possible to incorporate an external file (.mat? or a .m?) containing the parameters into the mod file.

How can one do this? Any help on this topic would be much appreciated.

Thanks,
Abhishek.
abhishek
agupta28
 
Posts: 29
Joined: Tue Mar 04, 2008 2:17 am

Postby reubenpjacob » Fri Jun 13, 2008 7:06 am

this is possible within the mod file.
you can do it in a loop
save a mat file containing the parameter draws.
then use the estimation command to load a fake mode file to load the set of parameter values to get your pol and trans functions for.
you can use an arbritary hh (hessian) matrix. it does not matter as your sole focus is the 'mode' : your chosen set of parameter draws.


dont forget to set the mh_replics to zero in the estimation command, as you just want to load the parameter values in the 'fake' mode file.

in short
estimation ( datafile=blahblah, mode_file=blahblah_mode, mh_replics=0...)
will do the trick.
then do stoch simul after the estimation command.
save the the pol and trans functions each time into an array you want to.

reuben
reubenpjacob
 
Posts: 133
Joined: Fri Oct 06, 2006 3:23 pm
Location: Reserve Bank of New Zealand

Postby agupta28 » Fri Jun 13, 2008 10:10 am

Dear Reuben,

Thanks for the prompt reply. However, I have a few more questions regarding the approach you just specified.

why do i need to do the estimation at all? if all i need is the policy transition functions can't I just load the parameter.mat file and do stoch_simul and save the policy and transition function? if i intend to do it for 1000 times estimation is going to take a lot of time on each run.

Also, I have never worked with a loop inside of a .mod file. Could you provide me an example for that.

Thanks,
Abhishek.
abhishek
agupta28
 
Posts: 29
Joined: Tue Mar 04, 2008 2:17 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 7 guests