[Gretl-users] Question about bundles in loops
cottrell at wfu.edu
Tue Sep 18 19:47:44 EDT 2012
On Tue, 18 Sep 2012, Logan Kelly wrote:
> I am using a loop to estimate several models, and I would like to
> store the results of each estimate in a bundle, i.e. the results
> from model1 should be stored in bundel1. So what I need is an
> array of bundles.
> I would like to do something like
> loop m = 1..ModelCount
> string results = "results$m"
> bundle @results
> @results["bla bla"] = bla bla
> The problem is I cannot declare a bundle in a loop.
What version of gretl are you running, on what platform? I'm not
aware of any problem with declaring bundles in a loop. The following
works fine here:
loop i=1..2 --quiet
bun$i["i"] = i
This gives (slightly trimmed):
i = 1
i = 2
There's no such object in gretl as an "array of bundles", as such,
but you can create a bundle of bundles if you want.
More information about the Gretl-users