Passing variables to the dynare command

Posted:
Mon Jul 08, 2013 11:24 pm
by Dr. En Ami
Thanks for the previous help. I would like to run estimation with forecast for different firstObs values. For example, I might like to call estimation n times with firstObs=i for i = 1:n for some user defined n. How can I do this is an automated fashion short of using meta code? Is there a way to pass variables to the dynare command? Thank you, --En
Re: Passing variables to the dynare command

Posted:
Sat Sep 14, 2013 8:38 am
by jpfeifer
You could use the macro language. For fs2000.mod you would require something like
- Code: Select all
@#define total_obs = [191,190,189,188]
@#for start_obs in 1:4
estimation(order=1, datafile=fsdat_simul,first_obs=@{start_obs},nobs=@{total_obs[start_obs]},loglinear, mh_replic=2000, mh_nblocks=2, mh_jscale=0.8);
save results_@{start_obs};
@#endfor