How do one estimate in a loop?

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.

How do one estimate in a loop?

Postby alexyoung » Mon Jan 21, 2008 3:09 pm

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!
alexyoung
 
Posts: 4
Joined: Sat May 05, 2007 7:25 pm

Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 6 guests