Generating parameters from vector of estimates

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.

Generating parameters from vector of estimates

Postby danielsolomon79 » Fri Aug 19, 2011 2:14 pm

Hi.

I have a model with quite a large number of parameters to declare for stoch_simul. I was wondering if it's possible to for example automatically generate parameter initialisation values in a mod file doing stoch_simul from the posterior mode vector without manually copying and pasting from excel or matlab into the mod file? Or if you have other tips on faster and more reliable ways to unpack a vector of estimates into parameter declarations in the mod file, you're welcome.

Thanks a lot.
danielsolomon79
 
Posts: 11
Joined: Fri Aug 19, 2011 2:05 pm

Re: Generating parameters from vector of estimates

Postby SébastienVillemot » Mon Sep 05, 2011 1:49 pm

This is feasible but you have to do a little programming. Separate your work in 2 MOD files: the first one with the estimation, the second one for the stoch_simul. At the end of the first file, save your posterior mode in a MAT file. At the beginning of the 2nd file, load the previous MAT file and assign the values to the parameters (in M_.params). If you use a different set of parameters between the 2 models, you'll have to pay attention to the mapping between the 2 sets.

Best,
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Re: Generating parameters from vector of estimates

Postby danielsolomon79 » Tue Sep 06, 2011 2:51 pm

Ok, thanks a lot.

I think I ended up doing exactly this following Wouter Den Haan's suggestion in his slides for looping over stoch_simul for multiple parameter vectors.
danielsolomon79
 
Posts: 11
Joined: Fri Aug 19, 2011 2:05 pm


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 13 guests