How to repeat estimations in a loop using different datasets

Hi,

In Dynare, how do I do estimations in a loop with different sets of data obsevations. In particular, say, for example I have a matlab data file containing vectors (100000by1 – simulated data) for the varobs, how do I ask Dynare to keep estimating based on the first 100 obsevations (1st-100th), the second 100 observations (101st-200th), and so on … for 100 times in a loop, and to generate 100 sets of parameters estimates (only need the modes).

Equivalently my question: how can I make something like this implementable in Dynare:
n=100;
for i = 1:99
estimation(datafile=glsysimdata,first_obs=i*n+1,nobs=99,lik_init=1,
mode_compute=4, mh_replic=0);
end;
where, glsysimdata contains all the 100000by1 vectors (or would it help to reshape them to 100by100?), in the above case, estimation would start from the 101st-200th (so a loop of performming estimations for 99 times).

Finally, if the above is doable, how can I save all the estimated modes (100 sets of posterior mode estimates with each set being estimated on each set of 100 obsevations)??

Many thanks in advance!

You could do it through matlab. You have to write procedure, which is creating small data file from you big one. After that procedure starts dynare file which estimate model using small data file. An you have to save you results in third file after that.
Possible, it isn’t easiest and fastest way, but it’s working.