It looks great. However, to be really useful with bootstrapping, it should
be possible to use the dataset command inside loops, which is not possible
right now.
Best regards
Andreas
cottrell(a)wfu.edu @ INTERNET skrev 2008-03-15 17:52:08 :
A while back, Andreas asked that the facility for resampling (with
replacement) the entire dataset be (a) documented, and (b) make
reversible.
In current CVS and Windows snapshot I have implemented (b). You can
do, for example,
dataset resample 100
# do stuff
dataset restore
The "dataset restore" command will attempt to re-establish the
original dataset. Modified values of scalar variables and newly
added scalars will be carried back, but any series added while
resampled will be discarded (as will any changes to pre-existing
series values).
I'm not going to document this for the 1.7.4 release because I
consider it experimental. Meanwhile I'd appreciate if people
can test this feature. Here's a little sample script:
open data4-1
scalar x = 4
ols 1 0 2
# over-sampling: the original dataset has n = 14
dataset resample 200
genr newseries = normal()
ols 1 0 2 ess = $ess x = 5
dataset restore
print -o # note: 'newseries' is gone
print x ess # new scalar values are preserved
Allin.
_______________________________________________
Gretl-devel mailing list
Gretl-devel(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-devel