On Wed, May 25, 2022 at 8:28 AM Sven Schreiber <svetosch(a)gmx.net> wrote:
Hi, this is with the Windows snapshot from May 23rd, previous gretl
installations were cleanly removed, and I made sure that there's only
one version/instance of the regls addon on the system (I hope).
See this example:
<hansl>
include regls.gfn
function void checko(series y, list X)
bundle stage1 = regls(y, X, _(ridge=TRUE))
print y # error
end function
open murder.gdt --frompkg=regls --quiet
list X = population..LemasPctOfficDrugUn
smpl 1 1000
checko(murdPerPop, X)
</hansl>
From the indicated line I'm getting an error "'y' undefined",
which
really puzzles me.
This problem is apparently not new, and is specific to calling regls
within a function. It is fixed in git but not yet in snapshots. A
workaround is, in a function such as checko, to copy the series in
question before passing it to regls. The series is not destroyed, but
ends up in the wrong namespace -- that of the caller of checko instead
of that of checko.
Allin