completely unimportant ambiguity
by Sven Schreiber
Hi all,
OK so this isn't really a serious point, but when looking at old loop
code it occurred to me that the short switch "-q" (standing in for
--quiet) is ambiguous. Consider this:
<hansl>
q = 1
loop i = 1 .. 3 -q # up to 3 and quiet or up to 2 (3-1)?
print i
endloop
</hansl>
Again, now that we've had quiet loops per default for some years now,
this isn't an issue.
And gretl is getting this "right" in the sense that it depends on
whether there's a blank or not: 3 -q (quiet) vs. 3-q (=2). Nonetheless,
I wonder whether the short option forms are really wise to allow in such
contexts. Oh well.
thanks
sven
1 month
recently little plotting delays on Windows?
by Sven Schreiber
Hi all,
I just want to share an observation of the past few weeks and would like
to ask if it's just me. Subjectively it seems to me that there is a
little delay when asking gretl to plot something; this is on Windows 10
and 11, and relatively recent hardware. The delay isn't very long, I
guess no more than one second, and it also seems to be varying. So it's
not severe enough to really be an obstacle, but gretl has always felt
very lightweight and snappy, and this experience is distorting that
impression a little bit.
Obviously, my suspicion is that it could be related to the new internals
of the gretl version for Windows, so Gtk3 and/or the ucrt thing. But
maybe it's a different underlying gnuplot version that is shipped now?
Or something else entirely?
Or perhaps it's just my imagination or some idiosyncratic problem, and
that's why I'm asking this question here. What I've heard so far is that
the Linux users haven't noticed anything.
thanks for any feedback and hints, e.g. how to test further
sven
1 month, 2 weeks
PCA with missing values
by Riccardo (Jack) Lucchetti
For some work I'm doing, I need to apply PCA to data containing missing
values. So I dug up some old code that I had around, which implements
Stock and Watson's EM algorithm (detailed in the 2002 JBES article).
I'm attaching a script with the function and an example if anyone's
interested.
Of course, it'd be nice to make this procedure more readily available to
gretl users. I see four (not mutually exclusive) ways of doing so:
1) modify our existing "pca" command to handle missing values;
2) modify our existing "princomp" function to handle missing values;
3) create a small self-contained function package;
4) integrate the code into the existing "staticfactor" function package.
Which one do you this is best?
-------------------------------------------------------
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, 2 weeks
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 month, 2 weeks
sourceforge downloads
by Sven Schreiber
Hello everybody,
for me the download speed for the Win installers from sourceforge is
horrible again, it's taking ages. I'm on Wifi, but we're talking of
effective speeds of 200KB/sec. Of course other stuff like antivirus
software could play a role, but it's not the first time, so are you
seeing the same problem?
thanks
sven
1 month, 3 weeks
surprising type change
by Sven Schreiber
Hi,
I have been struggling with this unexpected behavior:
<hansl>
matrix m = {0.5}
eval typename(m) # matrix
b = _(hu=m)
eval typename(b.hu) # scalar
</hansl>
So the mere copy of the object changes its type here. (Also happens
outside of a bundle, but there you can force the type more easily.) I
don't think that should happen.
thanks
sven
1 month, 3 weeks
latest Windows snapshot failing
by Sven Schreiber
Hi,
the sample script of my package PTconf (current version 1.2) runs fine
on 2024c and on a snapshot from Oct 25th, but is failing with an error
on yesterday's snapshot. (error with new starting obs)
Maybe the recent work on subsampling didn't quite get there yet?
thanks
sven
1 month, 3 weeks
Formated print of string arrays
by Artur T.
Dear all,
Is it possible to use formatted printing for string arrays? If so, how?
If now, why?
Here is a minimal example of the current behavior:
<>
? strings S = defarray("A", "B")
? print S
Array of strings, length 2
[1] "A"
[2] "B"
? printf "Content: %s\n", S
Data types not conformable for operation
</>
Thanks,
Artur
1 month, 4 weeks