On Fri, 30 May 2008, Sven Schreiber wrote: > Hello, > > either this post contains a relatively stupid question or I've stumbled > upon a strange bug in gretl. this is with the released 1.7.4 on windows > (no snapshot). Since you would have asked me for it anyway, I'm > providing a testcase right away. > > The attached script contains two gmm blocks, which AFAICS should be > independent and not affecting each other. The funny thing is, if I > comment out the first gmm block, the results of the second gmm > estimation change. As I'm writing this, tired and everything, I feel > sure that somebody is going to point out a programming mistake and make > me feel embarrassed, but well, maybe it's a gretl bug after all.
Fortunately, it isn't. When you do 2 or more steps in GMM, the weights matrix gets updated. Hence, in your script the second GMM blocks starts with the weights matrix out of the first one. If you insert the statement matrix dnew2weights = inv(dnew2mat'dnew2mat) between the two gmm blocks, you get that the second estimate is precisely equal to what would have been if you had skipped the first gmm block. Riccardo (Jack) Lucchetti Dipartimento di Economia Università Politecnica delle Marche r.lucchetti(a)univpm.it http://www.econ.univpm.it/lucchetti
