On Fri, 19 Feb 2010, Sven Schreiber wrote:
Fritsche, Ulrich schrieb:
> I am shifting part of my (formerly EViews-based) teaching material into
> gretl for a newly designed undergraduate course. One of the things I
> intended to do was to run a little Monte Carlo study to explain the
> concept of simulation.
>
> I used the code from the E-Book by Lee Adkins:
> open "c:\Program Files\gretl\data\poe\food.gdt"
> set seed 3213798
> loop 100 -- progressive
[snip]
Hi Uli, I'm just guessing, but many variables here do not seem
to be series but scalar variables. AFAIK you can save those to a
gretl "session" (.gretl), but not to a datafile (.gdt).
You can save "scalars" to a .gdt datafile in the context of a loop
with the "progressive" option, since in this case they actually
become series, with one element for each time around the loop.
The bug that caused the crash here has now been fixed in CVS and
the gretl snapshots for Windows and OS X (see the gretl website
for links). However, there is also a simple work-around: add the
--quiet option at the top of the loop to prevent the loop commands
from echoing (the bug was in the echo).
One more point: in option flags such as "--progressive" there
should be no spaces between the two dashes and the following word.
The script above has "-- progressive" which is a syntax error, but
the error was not being caught. This was a secondary bug that is
now also fixed.
Allin Cottrell