interaction effects with only series (no lists)
by Sven Schreiber
Hi everybody,
in chapter 15 of the user guide under "Generating lists of transformed
variables" there is an explanation of how to use the "^" operator to
create a list of interaction effects. This is nice, but to the average
user it might be surprising to read in the footnote "this construct does
not work if neither D nor Z are of the the list type." The reason for
this, AFAIK, is that if both D and Z are series objects, then D^Z is
just the exponentiation of the corresponding values of D by Z, and so we
get a single series in return with a totally different meaning. (And
since this series is then anonymous, trying to assign it to a list type
yields an error.)
I believe there are some little problems with this situation.
1) This is not my main point, but there might be a danger of
inadvertently doing the exponentiation although it wasn't intended. Example:
<hansl>
open mroz87.gdt
# KL6 is a discrete number of children, WA is (pseudo-) continuous
inter = KL6 ^ WA # note no explicit "list" type is indicated
</hansl>
This will create a series "inter" which has nothing to do with
interaction effects. Possibly this could imply subtle bugs, if "inter"
is mistakenly treated as a regressor list down the road.
Possible solutions for this problem: Perhaps mention this danger
explicitly in the documentation. Also, why actually is the "^" operator
overloaded with these very different things? Couldn't the interaction
thing be indicated through, say, "^^" instead?
2) It's a bit of a pity that interactions through this mechanism aren't
possible for single series, i.e. that 'list inter = KL6 ^ WA' currently
must fail. It would be nice if this could be generalized, no?
Possible solutions for this second point: Agani, if we had a different
and exclusive operator like "^^", then it would seem to be fairly easy
to implement, right? Apart from that, I guess that a pretty
straightforward workaround could be mentioned in the guide, namely
something like:
list H = deflist(D) ^ Z
(which in the specific context above becomes: list inter = deflist(KL6)
^ WA, tested as working).
OK, so bottom line, I think we should add some remarks to the
documentation, and then maybe discuss the pros and cons of having a
separate operator.
thanks
sven
2 weeks, 3 days
dummify() function vs. dummify command
by Sven Schreiber
Hi,
I'm a little confused about the "dummify" situation:
In the _function_ reference, it says that dummify() takes a series
argument, which should be discrete. Fine. Then in the _command_
reference the input to the dummify command is a list, which is also fine
- basically, the command automatically loops through the series in the
list input.
However, in the doc for the cmd it says you can use "ols y dummify(x)".
Isn't this mixing up hansl functions and commands? So that this example
should be moved to the _function_ doc? (And perhaps be cross-referenced
from the _command_ doc.)
thanks
sven
2 weeks, 3 days
various contributed packages with messed-up help text formatting
by Sven Schreiber
Hi,
I'm wondering whether in recent months / years there has been a change
in gretl behavior which causes problems with the formatting and/or
display of the help text of function packages.
For example, about three weeks ago I noticed such a problem with the
ModRS_test package, and I contacted the author about it. (Update
pending, in principle.)
But now I'm seeing a similar (although less severe) problem with Artur's
CvDataSplitter, or gregory_hansen. There are more, I believe, and it is
becoming impractical to have all those packages updated.
Speculations about the cause:
- gretl's relatively recent support for markdown might perhaps have side
effects for non-markdown stuff?
- I'm using the new Windows GTK3/ucrt gretl version, could this be a factor?
- ...?
First of all, the question is, do you see what I mean?
thanks
sven
2 weeks, 4 days
request/idea: defining new matrix literally
by Sven Schreiber
Hi,
I think it could be useful to offer a fourth way of defining a new
matrix in the GUI. Currently we have three options in the
matrix-definition dialog:
1) create from series
2) use a formula
3) enter numbers, giving first the wanted rows and cols and the initial
fill value.
This third thing is flexible, but you have to pre-specify row and
column numbers, and if you get that wrong, then you have to start from
scratch, AFAIK. (The width of the columns shown in the following window
is also bit wide for my taste, but that's a different issue I guess.)
The fourth method I have in mind is simply an empty but multi-line text
field for entering a literal string. At least two formats could be
supported there:
4.i) The standard hansl way of writing a matrix literal, e.g.
"{3, 2.5; \
1, -3; \
0, NA}"
(without the quotes)
4.ii) Or the format used by the mwrite/mread functions, with the
dimensions in the first line, so:
"3 2
3 2.5
1 -3
0 NA"
I would hope that since both of these formats are already used, it
wouldn't be a big problem to support them. Another hope would be that
GTK offers a multi-line editable text field with relative ease.
What do you think?
thanks
sven
2 weeks, 4 days
problem with double-passing of series into function
by Sven Schreiber
Hi,
I'm sorry I didn't notice this before the release (this is with 2024c):
<hansl>
function void checklist (const list L, const series b)
list all = L b
end function
function void checklist2 (const list L, series b)
# this works
# only difference is that the series b is not "const"
list all = L b
end function
open denmark
list outs = IBO IDE
# works:
checklist2(outs, IDE) # notice IDE is also in outs
# fails:
checklist(outs, IDE)
</hansl>
Not sure whether there exists an even more minimal example, but I hope
it's clear enough. Am I doing something wrong with the const qualifiers?
But I'm not trying to alter the arguments that are passed in.
I vaguely remember a similar problem some time ago (months, years?), but
no details, sorry.
thanks
sven
3 weeks, 3 days
translation questions
by Sven Schreiber
Hi,
while updating the German translation, I came across the following
unclear (to me) items:
- actually, a typo in the English original: "Save return value
(optional, clear box for no assigment):" (missing n)
- "Byval" - what's the context, what does it mean? I checked the source
in lib/src/describe.d and I suspect it's about factorized descriptive
statistics, but I cannot replicate it in gretl's summary statistics.
- "factorized" - in gui/gretl.c in line 1914 it's the only string in
that area not capitalized, maybe it should be?
BTW, a note to fellow translators, maybe it's not clear to everybody
that now some strings are associated with the addons instead of core
gretl. I believe this is a new thing with this release. (Or maybe
already the one before?)
thanks
sven
4 weeks, 1 day
gretl for Windows
by Cottrell, Allin
My apologies if you get this message twice, but I wanted to give it
maximum exposure.
Short story: with the next release, 2024c, we plan to make substantial
changes to our 64-bit Windows build (though mostly they will not be
very visible to users) and we'd like to get as many people as possible
to give the new build a try in advance of the release (currently
slated for the week beginning October 21).
As of later today, the snapshot on sourceforge labeled
gretl_install-64.exe will be the NEW build. If anyone tries it, has a
problem, and wants to revert, a "traditional" snapshot will still be
available:
https://sourceforge.net/projects/gretl/files/snapshots/gretl_install-64-g...
What's changed in the new build?
* We now link against the "new" (starting with Windows 10) Microsoft C
library, known as the Universal C Run-Time or UCRT. This is mainly a
matter of future-proofing, but it may bring improved performance in
some respects.
* The graphical interface now uses version 3 of GTK (as opposed to
GTK2). The main reason for this change is that gretl should look
better on small high-resolution displays (as on laptops) when
App-scaling is in force in Windows.
* Many of the other third-party libraries on which gretl depends have
been updated.
* The cross-compiler with which we build gretl has been updated from
gcc 10.3.0 to gcc 14.2.0.
Allin Cottrell
1 month
xmin/xmax
by Riccardo (Jack) Lucchetti
Long story short: for creating a series that contains the minimum
between x and y the shortest way we have is to use
<hansl>
series m = x < y ? x : y
</hansl>
which is nice, but I just realised that maybe some people would find it
more intuitive to use the xmin() function, as in "series m = xmin(x,
y)". The function, however, is at present scalar-only.
So I wrote a patch to extend xmin() and xmax() to series, matrices and
scalars, pretty much in the same way atan2() works. The patch is attached.
Comments are obviously welcome. If nobody stops me, I'll push the change
to git master tomorrow.
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------
1 month
ACF and documentation of Bartlett standard errors
by Sven Schreiber
Hi,
I think the choice of Bartlett standard errors for the correlogram in
the GUI is relatively recent (not sure), while the corresponding
--bartlett option for the corrgm command has been there for a long time.
In any case, I was made aware of the special null hypothesis underlying
the Bartlett variant: namely that for the interval at lag k the null
hypothesis is an MA(k-1). This is not a problem (of course), but the
standard confidence intervals come from white noise as the null
hypothesis. So the choice of Bartlett standard errors in this case isn't
just some robustification or small-sample thing (as opposed to a
Bartlett correction in other contexts, for example), but involves a
different view.
So far so good, but I haven't found any mention of what the Bartlett
errors actually mean. I have checked the GUI help text (for
"Correlogram"), the documentation of the corrgm command, and the user
guide. Actually, I was a bit surprised that the user guide and
specifically the univariate time series chapter does not mention the
ACF/PACF/correlogram at all. (Searching for "corrgm" or "ACF" doesn't
show anything, and "correlogram" only shows up in a different context as
cross-correlogram.) This is not a criticism, but just an observation --
maybe there are places I have overlooked.
I think wherever these Bartlett standard errors are mentioned as an
option, the different null hypothesis should be made explicit. I also
think it would be good to put the word "Bartlett" into the ACF plot if
it's chosen.
I'm posting this here for discussion, maybe I'm misunderstanding the
intention or assumption for those Bartlett standard errors, since I
haven't checked the source code (yet).
thanks
sven
1 month
Data labels in scatterplots
by Riccardo (Jack) Lucchetti
Hi all,
this post is mainly after a request made to me by a colleague who needed
this in class to show something to her students.
It would be nice if it was possible to tweak a few details on the labels
one can put on a scatterplot via the "Data labels" interactive facility
that we have. In detail:
(a) at present, you don't get the option if the number of points is
geraater than 250 (gui/gpt_control.c, line 89).
(b) there's no way to adjust the font size, other than saving the plot
to the session and manually tweaking the gnuplot script.
As for (a), one may think 250 is more than enough, and I agree that in
general it is. However, consider the situation when you have a big blob
of points and 2 o 3 outliers far away from the rest. Surely, it would be
nice to be able to see who these guys are.
Perhaps we could have a libset variaable to handle this, or some other
machanism.
Of course, I'm not proposing to put this in for the next release, that's
just round the corner, but it would be nice to give it some thought for
the future.
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------
1 month, 1 week