regls GUI fails with lags
by Sven Schreiber
Hi,
I was alerted to the fact (which I can reproduce) that doing regularized
LS via the GUI fails with an error "unknown variable name" when lags are
included in the regressor list.
This is the latest snapshot on Windows.
cheers
sven
3 years, 10 months
hdprod() extension
by Riccardo (Jack) Lucchetti
Hi all,
I have an ongoing project in which I'm using the hdprod() function quite
often. Specifically, the syntax I'm using is something like
Q = hdprod(X, X)
For those unfamiliar: if X is a Txn matrix, the result Q is a T x n^2
matrix in which each row is the Kronecker product of the corresponding row
of X by itself. In other words, in this case each row of Q will be the
vectorised version of a symmetrix nxn matrix. In practice, this is the
(much faster and efficient) equivalent of
<hansl>
matrix Q = {}
loop i = .. cols(X)
xi = x[,i]
loop j = 1 .. cols(X)
Q = Q ~ (xi .* x[,j])
endloop
endloop
</hansl>
Now: I only need the non-repeated columns of Q. While this is easy enough
to accomplish by selecting the appropriate columns, it strikes me as a
very inefficient solution. In fact, each time you call hdprod() with
arguments 1 and 2 being equal, you get a matrix with (potentially) lots of
repeated columns and you perform the same multiplication more times than
you should.
Hence, my proposal: I'd like to modify hdprod() so that the second
argument becomes optional. If absent, it is understood to be equal to the
first one. In that case, the returned matrix will not have n^2 columns,
but only n x (n-1)/2, arranged appropriately. Note that this extension
would be completely backward-compatible.
Note: I'm not tackling for the moment the case where one of the two
arguments may be complex; I guess this can wait.
Any objections to this plan?
-------------------------------------------------------
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
-------------------------------------------------------
3 years, 10 months
saving gdtb: gretl retains old extension
by Sven Schreiber
Hi,
another minor glitch: I had a large Stata dta file and imported it into
gretl - this actually worked flawlessly via dragging-and-dropping (on
Windows). Then I went on to save it; in the save dialog gretl inserted
the extension "gdt" automatically, and when I changed the format to the
binary gdtb type in the drop-down box at the bottom, in the end I had a
file ending in .gdt.gdtb.
Obviously very easy to correct manually in various ways along the steps
taken, but maybe now we want to shake out even minor stuff like this.
thanks
sven
3 years, 10 months
panel dataset info line weirdness
by Sven Schreiber
Hi,
with a Jan 19th snapshot I was just loading a panel dataset from a gdtb
file. The strange thing was that the info line at the bottom then said:
"Undated: Full range 1:00 - 9237:25"
First, the obs labels correctly indicate a panel, which is inconsistent
with "undated".
Secondly, there are 26 waves but gretl counts 00-25. Off by one from C
internals?
After using panel index variables (setobs implicitly), it seems to be fine.
thanks
sven
3 years, 10 months
error message from 'setobs' too generic
by Sven Schreiber
Hi,
not a bad bug, but still made it a little difficult to debug a script --
I've noticed that in a panel data context doing:
setobs x y --panel-vars
where x is wrong (doesn't exist) yields a generic "data error". I would
have expected "x: no such thing".
thanks
sven
3 years, 10 months
glitches with bundles and systems: bug or not supported?
by Sven Schreiber
Hi,
hammering the release candidate on some special system cases some more:
Consider this first example:
<hansl>
open denmark
bundle b
list endo = diff(deflist(LRM, IBO))
list rhs1 = deflist(const, LRY)
list rhs2 = deflist(const, IBO(-1))
lists rhses = defarray(rhs1, rhs2)
list b.endo = endo
lists b.rhses = rhses
system
equations endo rhses # works
end system
system
equations b.endo b.rhses # "b.endo not found"
end system
</hansl>
I'm not sure if list(s) inside bundles are supposed to work in this
context or not.
(And BTW while we're at it, "equations" isn't recognized and
syntax-colored.)
--
Secondly, here's something with string substitution and a newline character:
<hansl>
open denmark
system
equation LRM 0 LRM(-1)
equation IBO 0 LRM IBO(-1)
end system
# standard way:
restrict $system
b[1,2] = 0
b[2,1] = 0
end restrict
estimate $system method=ols
# now with string substitution:
string rs = sprintf("b[1,2] = 0 \n b[2,1] = 0")
print rs # looks good, with line break
restrict $system
@rs # error: undefined symbol b
end restrict
</hansl>
Note that this whole thing with string substitution works fine when
there's only a single restriction, no \n character in the string!
This example probably looks a bit artificial, but the use case is to
process stuff like that programmatically inside a function.
thanks
sven
3 years, 10 months
SIGSEGV
by Marcin Błażejowski
Hi,
not very wise script, but produces SIGSEGV when you click on matrix "M"
in GUI.
M
--
Marcin Błażejowski
3 years, 10 months
Failed to compile 2020a on linux
by Artur Tarassow
Hi Allin,
I just tried to compile gretl under Ubuntu 18.04 and Ubuntu 20.04. Both
times the compilation fails when using my standard bash script:
<bash>
#!/bin/bash
cd "$HOME/git/gretl-git" || exit
git pull
make clean
./configure \
--enable-build-doc \
--enable-build-addons \
--with-odbc \
--enable-quiet-build
make -j"$(nproc)"
sudo make pdfdocs
sudo make install
</bash>
The log is as follows:
<terminal>
make[1]: Verzeichnis „/home/at/git/gretl-git/po“ wird verlassen
CC bhhh_max.lo
CC bootstrap.lo
CC boxplots.lo
CC calendar.lo
CC compare.lo
CC compat.lo
CC csvdata.lo
CC dataio.lo
CC dataset.lo
CC dbread.lo
CC dbwrite.lo
CC describe.lo
CC discrete.lo
CC estimate.lo
CC flow_control.lo
CC forecast.lo
CC geneval.lo
CC genfuncs.lo
CC genlex.lo
CC genmain.lo
CC gensyntax.lo
CC gmm.lo
../lib/src/gensyntax.c: In function ‘pad_parent’:
../lib/src/gensyntax.c:1076:2: error: ‘n’ undeclared (first use in this
function)
1076 | n = newempty();
| ^
../lib/src/gensyntax.c:1076:2: note: each undeclared identifier is
reported only once for each function it appears in
make[1]: *** [Makefile:313: gensyntax.lo] Fehler 1
make[1]: *** Auf noch nicht beendete Prozesse wird gewartet …
make[1]: Verzeichnis „/home/at/git/gretl-git/lib“ wird verlassen
make: *** [Makefile:69: lib] Fehler 2
[sudo] Passwort für at:
if [ "xdoc" = "x" ] ; then \
echo "pdfdocs: this target is not enabled" ; else \
make -C doc ; fi
make[1]: Verzeichnis „/home/at/git/gretl-git/doc“ wird betreten
make -C tex
make[2]: Verzeichnis „/home/at/git/gretl-git/doc/tex“ wird betreten
make -C ../commands ../tex/tabnonloopcmds.tex
make[3]: Verzeichnis „/home/at/git/gretl-git/doc/commands“ wird betreten
gcc -g -O2 -I/usr/include/libxml2 -I/usr/include/glib-2.0
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I../../lib/src -I../.. -c
tables.c
make -C ../../lib
make[4]: Verzeichnis „/home/at/git/gretl-git/lib“ wird betreten
CC gensyntax.lo
../lib/src/gensyntax.c: In function ‘pad_parent’:
../lib/src/gensyntax.c:1076:2: error: ‘n’ undeclared (first use in this
function)
1076 | n = newempty();
| ^
../lib/src/gensyntax.c:1076:2: note: each undeclared identifier is
reported only once for each function it appears in
make[4]: *** [Makefile:313: gensyntax.lo] Fehler 1
make[4]: Verzeichnis „/home/at/git/gretl-git/lib“ wird verlassen
make[3]: *** [Makefile:192: ../../lib/libgretl-1.0.la] Fehler 2
make[3]: Verzeichnis „/home/at/git/gretl-git/doc/commands“ wird verlassen
make[2]: *** [Makefile:248: tabnonloopcmds.tex] Fehler 2
make[2]: Verzeichnis „/home/at/git/gretl-git/doc/tex“ wird verlassen
make[1]: *** [Makefile:11: tex] Fehler 2
make[1]: Verzeichnis „/home/at/git/gretl-git/doc“ wird verlassen
make: *** [Makefile:72: pdfdocs] Fehler 2
./builddate
build.h is current
make -C lib
make[1]: Verzeichnis „/home/at/git/gretl-git/lib“ wird betreten
CC gensyntax.lo
../lib/src/gensyntax.c: In function ‘pad_parent’:
../lib/src/gensyntax.c:1076:2: error: ‘n’ undeclared (first use in this
function)
1076 | n = newempty();
| ^
../lib/src/gensyntax.c:1076:2: note: each undeclared identifier is
reported only once for each function it appears in
make[1]: *** [Makefile:313: gensyntax.lo] Fehler 1
make[1]: Verzeichnis „/home/at/git/gretl-git/lib“ wird verlassen
make: *** [Makefile:69: lib] Fehler 2
./compile-gretl_git.sh: Zeile 23: [: Zu viele Argumente.
if [ "xdoc" = "x" ] ; then \
echo "pdfdocs: this target is not enabled" ; else \
make -C doc ; fi
make[1]: Verzeichnis „/home/at/git/gretl-git/doc“ wird betreten
make -C tex
make[2]: Verzeichnis „/home/at/git/gretl-git/doc/tex“ wird betreten
make -C ../commands ../tex/tabnonloopcmds.tex
make[3]: Verzeichnis „/home/at/git/gretl-git/doc/commands“ wird betreten
make -C ../../lib
make[4]: Verzeichnis „/home/at/git/gretl-git/lib“ wird betreten
CC gensyntax.lo
../lib/src/gensyntax.c: In function ‘pad_parent’:
../lib/src/gensyntax.c:1076:2: error: ‘n’ undeclared (first use in this
function)
1076 | n = newempty();
| ^
../lib/src/gensyntax.c:1076:2: note: each undeclared identifier is
reported only once for each function it appears in
make[4]: *** [Makefile:313: gensyntax.lo] Fehler 1
make[4]: Verzeichnis „/home/at/git/gretl-git/lib“ wird verlassen
make[3]: *** [Makefile:192: ../../lib/libgretl-1.0.la] Fehler 2
make[3]: Verzeichnis „/home/at/git/gretl-git/doc/commands“ wird verlassen
make[2]: *** [Makefile:248: tabnonloopcmds.tex] Fehler 2
make[2]: Verzeichnis „/home/at/git/gretl-git/doc/tex“ wird verlassen
make[1]: *** [Makefile:11: tex] Fehler 2
make[1]: Verzeichnis „/home/at/git/gretl-git/doc“ wird verlassen
make: *** [Makefile:72: pdfdocs] Fehler 2
for d in lib cli gui plugin po share xdg addons ; do make -C $d clean; done
make[1]: Verzeichnis „/home/at/git/gretl-git/lib“ wird betreten
rm -f *.lo *.o libgretl-1.0.la
rm -rf .libs .deps
</terminal>
Artur
3 years, 10 months
cnameset (rnameset): no error on mismatch
by Sven Schreiber
Hi,
when using cnameset (and presumably also rnameset) with input that
doesn't match the dimensions, nothing happens. See here:
<hansl>
matrix m = ones(2) # column
cnameset(m, defarray("a","b")) # doesn't match, should give an error?
print m
</hansl>
I wonder if an error should be thrown instead? Or else perhaps the first
available elements of the array should be used?
thanks
sven
3 years, 10 months