clean-up of the "Cheat sheet" guide chapter
by Sven Schreiber
Hello everybody,
I'm currently looking at ch. 21 of the guide, "Cheat sheet". I'd propose
the following cleanups (which I could apply if people agree):
section 21.1:
- Time averaging of panel datasets: I think it would be nice to use a
real-world dataset such as grunfeld.gdt instead of having the slightly
distracting code for creation of artificial data.
section 21.2:
- Generating a dummy variable for a specific observation: Instead of
t=="Italy" one can also write obs=="Italy", which may be more intuitive
for cross-sectional data.
- Generating a “subset of values” dummy: Nowadays one could use the
contains() function I think, which would be more readable.
section 21.3:
- Interaction dummies (p. 194 of the A4 guide version from October):
remove the old string-substitution-based code that pre-dates the
interaction operator (^; which is also already mentioned there).
- Realized volatility: Is this example even consistent? It starts by
talking about minutes and hours, but then switches over to seconds and
minutes. Maybe that's part of the clever trick, I don't know... Apart
from that, it seems that another trick in the cheat sheet could be
re-used here, namely "Moving functions for time series".
- Looping over two paired lists: Can't this one be generalized, by using
Lx[i] and Ly[i] instead of y$i and x$i ?
- Cross-validation: Could it be that using some feature of the regls
apparatus or a contributed package (by Artur?) would be more practical
nowadays?
- Is my matrix result broken? - One could now use sum() instead of
sumc(sumr()).
cheers
sven
1 week
data artefact for added obs
by Sven Schreiber
Hi all,
I just observed the following unwanted behavior; this is with gretl
2024d, but probably not brand new:
- I have a short yearly dataset spanning 2013-2023. (Confidential,
cannot share it here.)
- There are 14 time series in it, and somewhere in the middle is a
binary dummy, although its "discrete" flag in the attributes is _not_
set. Don't know whether that matters.
- Via the menu I add another obs to the dataset, for the year 2024.
- All variables have missings for the new obs, as expected, _except_ the
dummy: it has a (spurious) value 1 for the new obs. This is wrong.
thanks
sven
1 month, 2 weeks
blanks in function arg bounds
by Sven Schreiber
Hi,
is it expected that whitespace is not allowed in the following context?
<hansl>
function void f1(int n[0:2:1])
print n
end function
function void f2(int n[0 : 2 : 1]) # syntax error
print n
end function
f1()
f2()
</hansl>
thanks
sven
2 months