Passing variables to the dynare command

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

You could use the macro language. For fs2000.mod you would require something like

[code]@#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};