[Gretl-devel] resampling the full dataset
andreas.rosenblad at ltv.se
andreas.rosenblad at ltv.se
Tue Mar 18 06:19:08 EDT 2008
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 at 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 at lists.wfu.edu
> http://lists.wfu.edu/mailman/listinfo/gretl-devel
More information about the Gretl-devel
mailing list