On Sat, 3 Oct 2009, Ofer Cornfeld wrote:
Hi,
I'm working on GRETL CVS under windows XP.
Attached please find a dataset that I'm using and a two similar GRETL
scripts.
gmm93 do not crash GRETL and gmm93-a do crash GRETL. The difference between
the two is a minor addition in line 87 of gmm93-a.
I hope this can help pinpoint the bug.
Thanks, Ofer.
The two scripts you sent are identical, but both crash, so no big deal.
The real bug is that gretl shouldn't crash. However, allow me to give you
a few tips: your script is very difficult to debug. You're computing the
orthogonality condition on one monster line. I _suspect_ something goes
wrong at some point with the parentheses or with the sheer size of the
line, and that's what makes gretl crash (which, I repeat, is a bug ---
internal message: something appears to go wrong in real_append_line() in
lib7src/monte_carlo.c).
In general, though, it's advisable to break down a complex statement
into a series of smaller ones; often, this also makes your script more
efficient, since you avoid recomputing thet same quantities several times.
See the attached script, which is a slightly revised version of yours.
Please note that my script runs, but may be wrong in more than one place:
what you're trying to do is not very clear to me, so I may have
misunderstood your code. However, I think my version is much easier to
debug.
Oh, and another thing: gretl isn't matlab. You don't need semi-colons at
line endings :-)
Riccardo (Jack) Lucchetti
Dipartimento di Economia
Università Politecnica delle Marche
r.lucchetti(a)univpm.it
http://www.econ.univpm.it/lucchetti