defbundle parsing
by Sven S
Hi,
the following line works, but shouldn't it fail due to the trailing comma?:
bundle b = defbundle("a",1 ,)
thanks
sven
3 years, 11 months
Packages
by Ivan Falconi
Hi, I received the message below. What does "staging area" mean in this
context, please? I am trying to activate the options for tests of time
series analysis once it has been modelled. Normality test opens in both
cases, when the dataset is declared as cross-section and time series. The
autocorrelation test only opens when the dataset is declared as time
series. Why homogeneity of variance is not activated for both cases? I had
to use the Barlett's test instead.
I am reviewing Prof. Adkins's POE5 user guide and have not found yet a clue
about it. I am already in page 59 (functions). I would be appreciative for
any hint. Thanks in advance.
Have a Healthy 2021.
Regards,
Ivan Falconi
[image: image.png]
3 years, 11 months
clearing / unloading all user-defined functions?
by Sven Schreiber
Hi,
I wonder if it could make sense to amend the 'clear' command with an
option that would also unload all user-defined functions from memory and
the active session?
Related question: Is there currently a way other than restarting gretl
to achieve that? (I know how to unload functions from a package manually.)
thanks
sven
3 years, 11 months
illegal identifier allowed in list definition tool
by Sven Schreiber
Hi,
coming from a package's GUI window, the "plus" button allows to define
lists. One can enter illegal names in there which cause problems later.
I'd expect that illegal names aren't accepted by gretl already in that
window.
thanks
sven
3 years, 12 months
crash bug with matrices array (wrong) indexing
by Sven Schreiber
Hi,
this is on a Dec 12th snapshot on Windows, but I doubt that this problem
has changed since then.
Attention, the following example crashes (segfault/terminates) gretl:
<hansl>
matrices MM = defarray(I(2), I(3))
eval nelem(MM) # 2, as expected
MM = I(4) # implicitly turn to a 1-elem array? actually legal?
eval typestr(typeof(MM)) # array, OK
eval nelem(MM) # 1, semi-expected
matrix m = MM[,1] # illegal indexing -> crash
</hansl>
thanks
sven
3 years, 12 months
min, max: incomplete documentation and a generalization glitch
by Sven Schreiber
Hi,
I think some time ago min() and max() were extended from series (and
lists) to matrices.
First, this is missing in the function reference, I could add that.
Secondly, however, they fail whenever the matrix collapses to 1x1, for
example:
eval min(I(3)[1,1])
It would be good if it also worked on scalars to allow general code that
may yield 1x1-matrices.
thanks
sven
4 years
circular doc reference about genr
by Sven Schreiber
Hi,
the short chapter 10 of the guide says that "genr" is documented in the
command reference, but there there's a warning that "for comprehensive
and updated info on this command you’ll want to refer to chapter 10 of
the Gretl User’s Guide".
Also it's not clear to me how the sections in ch. 10 actually constitute
"special functions in genr"; they're about the long-run variance in a
totally separate function lrvar(), about the cdf() and pvalue()
functions, and finally about fft() and ffti(). It looks like a
relatively random selection of a few built-in functions that get some
extra explanations there. So instead of being in part I of the guide
"Running the program" shouldn't those things be moved to somewhere in
part II "Econometric methods" ?
Another suggestion would be to move or copy the stuff about "genr time",
"genr dummy", "genr unitdum" and "genr timedum" from the command
reference to that special-genr-functions chapter 10 of the guide.
cheers
sven
4 years
$xtxinv available after restricted VECM or not?
by Sven Schreiber
Hi,
the function reference says that after restricting the alphas in a VECM
you don't get $xtxinv, and I can see the reason why (I think).
However, this seems to work:
<hansl>
open denmark
vecm 4 1 LRM LRY IBO
restrict
a[1] = 0
b[1] = 1
end restrict --full
eval $coeff
eval $stderr
eval $xtxinv
</hansl>
Bug or feature?
thanks
sven
4 years
genr markers
by Riccardo (Jack) Lucchetti
Folks, I just realised that "genr markers" is not documented anywhere in
our xml files. IMO we should add an entry in the bullet list in the help
for the "genr" command. I don't think I'll have time to work on this for a
couple of days at least, so if someone wants to step in, that would be
nice.
-------------------------------------------------------
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
-------------------------------------------------------
4 years
generalized inverse for symmetric input
by Sven Schreiber
Hi,
I came across the situation where a relatively large symmetric but
singular matrix was given (quite a few eigenvalues very close to zero)
which I had to "invert". Understandably, gretl's invpd didn't like the
input. So I used ginv instead, but it then turned out the result was not
"sufficiently" symmetric; for example gretl's own qform function
complained about the alleged non-symmetry.
So I'm wondering whether hansl/gretl might benefit from a specialized
ginv function for symmetric input. Below is a proposal in hansl based on
standard algebra. Perhaps we even discussed something similar before?
thanks
sven
<hansl>
function matrix ginvsym(const matrix m, scalar thresh[0::1e-10])
# symmetry is only implicitly checked by eigensym
matrix evecs
matrix evals = eigensym(m, &evecs)
if min(evals) > thresh
print "Warning: generalized inv not required"
matrix out = invpd(m)
# (or alternatively:)
# out = (evecs .* (1 / evals')) * evecs'
else
r = rows(m)
matrix ev = selifc(evecs, evals' .> thresh)
matrix out = ev .* (1 / evals[r - cols(ev) + 1: r]') * ev'
endif
return out
end function
M = mnormal(40,20)
MM = M*M'
matrix GMM = ginvsym(MM)
# check symmetry:
eval max(abs(GMM - GMM'))
# check g-inverse property:
eval max(abs(MM - MM*GMM*MM))
</hansl>
4 years