Page 1 of 1

Question about repeating ML estimation many times

PostPosted: Thu Jul 10, 2008 1:57 am
by jygg1
Hello,
I have a question about doing ML estimation in dynare. Suppose I have artificial data for several endogenous variables. The sample size is T=200, and repetition is 1000. In other words, I have 1000 datasets for 200 periods. If I want to use those data to estimate the model (MLE) for 1000 times (since repetition is 1000), is it possible to do it using dynare? If not, could someone point out a way to do this? Thank you very much.

PostPosted: Thu Jul 10, 2008 7:40 am
by p.gelain
Hi

I don't know if it works, maybe it is just a stupid thing, but why not try? Try the following commands

for i=1:1000;
estimation(datafile:datafile(i), other OPTIONS);
end;

where of course you have to put the name of your file with the data in place of datafile(i). Let assume that you want to call it pippo...save your 1000 datasets as pippo1, pippo2, pippo3, etc.

Let me know....
Paolo

PostPosted: Wed Jul 23, 2008 4:30 pm
by jygg1
Hi Paolo,
Thanks for your suggestions. I have tried several possible ways...but it doesn't work at all. It seems that dynare does not allow parentheses in the options, and something like datafile(i) is also not allowed. Thus I don't know how to write a loop to efficiently estimate the model many times.
If anyone knows some other program or method that may help me, please let me know. I think some users are also interested in this issue. Hope I can find a way to do this. Thanks for everybody's help.

jygg1