crash with the fsboost package
by Sven Schreiber
Hi,
with a Windows snapshot from April I found that the sample script of the
fsboost contributed package produces an error. This was weird because
the sample script of a package is always checked before approving it. So
I updated to the latest Windows snapshot from May 4th, but now gretl
crashes completely when running the same sample script.
I suspect there's nothing wrong with fsboost, and instead the snapshots
after the 2022a release perhaps include some serious bugs leading to
crashes - I'm also thinking of the other recent problem on the mailing
list about saving session icons.
thanks
sven
2 years, 7 months
weird error when using regls
by Sven Schreiber
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. I mean 'y' is passed as an argument, is used
successfully (it seems) in the regls call, and then afterwards it
disappears??
thanks
sven
2 years, 7 months
bug (?) with matrix indexing into lists
by Sven Schreiber
Hi,
I'm stumbling over the following behavior, which I can't rationalize. In
short, using an indexing vector to pick certain elements of a list works
with {1,2}, but fails with {1,3}. (Yes, the list has three elements as
printed out by the example code.)
Or is indexing into a list not really supported but only working by
chance sometimes?
thanks
sven
<hansl>
open denmark
list L = LRM LRY IBO
list L print
list temp = L[{1,2}] # works
list temp print
temp = L[{1,3}] # fails
list temp print
</hansl>
2 years, 7 months
Internal error from the regls addon
by Sven Schreiber
Hi,
I'm trying to use the regls() function (from the regls addon) inside my
own hansl function. In my function I'm creating a list "Xw" which I then
pass as regressors to the called regls().
In this situation I'm getting an error message from regls's internal
function outer_series_id -- for convenience, here's what the function
looks like:
<hansl-regls>
function list outer_series_id (const string arg)
list L
loop i=1..$nvars
if varname(i) == arg
L = {i}
break
endif
endloop
return L
end function
</hansl-regls>
The error message says:
"'if'-Auswertungsfehler
> if ak
*** error within loop in function outer_series_id
> if varname(i) == arg
called by function regls
*** error in function regls, line 193
"
I think I've diagnosed the problem to be that $nvars is much much larger
than the number of elements in the list Xw (+1 for the dependent
variable), and that varname(i) at some point throws an error because of
that.
If I replace the if-line above with the following two lines, then
everything seemingly runs OK:
catch string vname = varname(i)
if !$error && vname == arg
I'm not sure if the use of $nvars in outer_series_id is a bug on the
regls side, or if there's a bug with gretl concerning which sub-parts of
the dataset (which series) are available in a nested function call here.
This is with gretl 2022a (no snapshot) on Windows.
cheers
sven
2 years, 7 months
string and "end" indexing and non-ASCII
by Sven Schreiber
Hi,
maybe this is again something which isn't really supported, but while
using the new "end" keyword for indexing into strings works generally
fine, there are problems if I'm using non-ASCII characters like German
Umlaute:
? s = "motorhead"
? s[1:end]
motorhead
? s = "motörhead"
? s[1:end]
Indexwert 10 außerhalb der Grenzen
( = out of bounds)
This is with a recent snapshot.
(And BTW, here I have bare expressions which AFAIK are not generally
allowed, but should be enough in this context...)
thanks
sven
2 years, 7 months
unexpected error with string escapes
by Sven Schreiber
Hi again, consider this one please:
<hansl>
function void cs(string s)
print s
end function
a = sprintf("\"") # works
print a
cs(sprintf("\"")) # fails
</hansl>
The last line gives me a weird "unmatched (" error.
cheers
sven
2 years, 7 months
installing a new package version should force a reload
by Sven Schreiber
Hi, it seems to me that installing a new version of a function package
while the old one is loaded does not imply loading the new version. I
have to manually choose "deactivate" (from the package list window and
right-click) in order to nudge gretl to then load the newly installed
version.
I tend to think that this should be done automatically.
thanks
sven
2 years, 7 months
heads-up: cnameset() and rnameset()
by Allin Cottrell
This is most likely relevant for authors of function packages, but
may affect some other gretl users.
The function cnameset() sets column names for a specified matrix,
and rnameset() sets row names. The help for these functions says
that you should supply a number of names equal to the column or row
dimension of the matrix in question, but up till recently we have
tolerated "excess names" (more names than columns or rows). What
happens in that case is not well-defined: it may be what you want or
it may not.
In current git, and probably in the next gretl release, this has
been tightened up: you MUST supply the right number of names or
these functions will flag an error.
If you're using current gretl git or a snapshot and you start seeing
an error from calls to cnameset() or rnameset(), that will be what's
going on.
Allin
2 years, 7 months
some more strings to be marked for translation
by Sven Schreiber
Hi, a trivial listing here, not only in the regls context:
in gui/dialogs.c:
-) 7560: dialog = gretl_dialog_new("gretl: regls options", parent,
GRETL_DLG_BLOCK);
-) 7436: dialog = gretl_dialog_new("gretl: BDS test", parent,
GRETL_DLG_BLOCK);
-) 7207: dialog = gretl_dialog_new("gretl: temporal disaggregation",
NULL, GRETL_DLG_BLOCK);
in gui/selector.c:
-) 6599: w = gtk_label_new("Estimator");
-) 6681: w = gtk_button_new_with_label("Advanced...");
cheers
sven
2 years, 7 months