latex required for building addons (even though no --enable-build-doc)
by Sven Schreiber
Hi again,
I'm noticing that I cannot build from git without having a Latex
installation, when I want to also build the addons. In other words, the
regular gretl build skips Latex and pdf creation when the configure
option --enable-build-doc is _not_ given, but using
--enable-build-addons fails without Latex.
Not a big deal of course, but on a Debian test system I had to pull in
texlive-latex-recommended, texlive-fonts-recommended,
texlive-latex-extra just because of that, which is easily 1GB in size.
thanks,
sven
5 years, 3 months
fixed effects logistic regression?
by Allin Cottrell
There's a colleague in my department who uses gretl for all his
empirical work, and does a lot of logistic regressions. He's a
political economy guy and in many cases the dependent variable is
the percentage vote in some legislative body for some bill or other.
We have logistic regression in gretl but it hasn't had much
attention in a long time. At my colleague's prompting I've recently
enabled the --robust and --cluster options for "logistic". But in
addition he also wants to use logistic regression in a panel
context. We have fixed effects (binary) logit already -- any
thoughts on what it would take to extend that to cover fixed effects
logistic?
Allin
5 years, 8 months
convolve function into extra?
by Sven Schreiber
Hi,
while looking at the example scripts I've noticed convolve.inp, and then
also the paragraph about Convolution in the guide (cheat sheet chapter,
p. 154 for me).
I wonder if this should be wrapped in a hansl function and added to the
'extra' addon, like this:
<hansl>
function void padzeros(matrix *a, matrix *b)
a = vec(a)
b = vec(b)
outrows = rows(a) + rows(b) - 1
a |= zeros(outrows - rows(a), 1)
b |= zeros(outrows - rows(b), 1)
end function
function matrix convolve(matrix p, matrix q)
padzeros(&p, &q)
return filter(p, q)
end function
# And for comparison only:
function matrix convolve_fft(matrix p, matrix q)
padzeros(&p, &q)
f = fft(p ~ q)
return ffti(cmult(f[,1:2], f[,3:4]))
end function
<hansl>
As mentioned in the guide, the filter-based variant is indeed about 30%
faster in my examples.
BTW, I think there are some typos in the notation in the Convolution
paragraph: The sum indices i should start at 0, not 1, and the upper
bound for the R(x) index should be p + q - 1 instead of pq-1.
Any feedback welcome.
thanks,
sven
5 years, 8 months
old function packages and write permissions
by Sven Schreiber
Hi,
not too long ago we had a thread about what happens (on Windows) when
function packages should be deleted. Now gretl reports an informative
error message (you don't have the permissions to remove it, or sth. like
that).
However, there still is a problem for example when packages have been
retired, so they do not exist on the server anymore. They have been
installed under gretl, but they cannot be locally removed again.
This is a bit awkward because if a newer version exists (so the package
is not retired, but updated on the server) overwriting is possible
without any problem.
So why is overwriting OK permission-wise, but deleting is not?
And to give a concrete example, one of those reorganized and retired
packages was LOGIT_HETERO.gfn by Artur.
thanks
sven
5 years, 8 months
INFO: $obsmicro refers to day instead of week for weekly series
by Artur Tarassow
Dear all,
for a weekly data set, the accessor $obsmicro returns the day instead of
the week. I would have expected that for this frequency the
"micro"-frequency should refer to the calendar week. See here:
<hansl>
open nysewk.gdt -q
series obsmin = $obsminor
series obsmic = $obsmicro # referece to day instead of week
print close obsmin obsmic -o
</hansl>
This is with latest git on ubuntu.
Best,
Artur
5 years, 8 months
cross-links from built-in help to example scripts
by Sven Schreiber
Hi,
we have many example scripts that are shipped with gretl, but although
they are properly labeled with a topic, the sheer number makes it
difficult to find out whether there is an example of a certain command
or function among them.
I think it would be useful if there were a cross-link from the built-in
references to those example scripts, where applicable. I'm not asking
for somebody else to do that (though I wouldn't mind some help), but is
this actually technically possible already? What I mean is, what would
such a cross-link look like in the documentation xml sources?
thanks
sven
5 years, 8 months
new accessor
by Allin Cottrell
Jack and I have recently been working on a new accessor. It's named
"$result" (so far) and it gets you a matrix after execution of
commands that don't have specific accessors of their own but whose
output can reasonably be represented as a matrix.
So far we've implemented this for corr, freq, summary, vif (the BKW
matrix) and xtab (the simple two-variable case only). We have in
mind a few other commands that could benefit from this treatment.
The accessor works a bit like $model, in that each time a supported
command is executed the prior $result matrix (if any) is destroyed
and a new one substituted.
We considered requiring a new option (say, --savemat) to make this
happen (since if the matrix isn't wanted we've wasted some CPU
cycles building it) but our current view is that it's not really
worthwhile.
Allin
5 years, 8 months
gretl crash
by Artur Tarassow
Dear all,
the following example crashes using latest git on ubuntu 18.10 with an
error:
<Speicherzugriffsfehler (Speicherabzug geschrieben)> aka 'memory access
violation'
<hansl>
clear
set verbose off
function bundle default_naiveFC_opts (const series y)
# Set default values
bundle self = null
self.h = 10 # forecast horizon
return self
end function
function bundle naiveFC (const series y,
string which "Select method",
bundle opts[null])
# Set up the bundle
bundle self = default_naiveFC_opts(y)
if exists(opts)
# override defaults
self = opts + self
endif
series self.y = y
# call method
if which=="meanf"
self.fc = meanf(&self) # !!! fails with a crash !!!
#self.fc = meanf2(&self) # works
endif
return self
end function
function matrix meanf2 (bundle *self)
return ones(self.h, 1) .* mean(self.y)
end function
function void meanf (bundle *self)
self.fc = ones(self.h, 1) .* mean(self.y)
eval self.fc
end function
# Example
open nysewk.gdt -q
bundle b = naiveFC(close, "meanf")
</hansl>
Interestingly, when you replace calling meanf() by meanf2() it works,
however.
Best,
Artur
5 years, 8 months