How to repeat estimations in a loop using different datasets

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 to repeat estimations in a loop using different datasets

Postby alexyoung » Wed Feb 13, 2008 12:09 am

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

Postby glucke » Wed Feb 13, 2008 6:46 am

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.
Sorry for my English. I'm from Russia.
glucke
 
Posts: 31
Joined: Sun Apr 01, 2007 6:43 pm


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 7 guests