Page 1 of 1

Generating parameters from vector of estimates

PostPosted: Fri Aug 19, 2011 2:14 pm
by danielsolomon79
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.

Re: Generating parameters from vector of estimates

PostPosted: Mon Sep 05, 2011 1:49 pm
by SébastienVillemot
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,

Re: Generating parameters from vector of estimates

PostPosted: Tue Sep 06, 2011 2:51 pm
by danielsolomon79
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.