GUI matters
by Allin Cottrell
There are a couple of aspects of the gretl GUI that have been
bothering me: (1) the matter of what should happen to the output when
you execute a script and there's already a script output window open;
and (2) the matter of auto-showing, or not, the "icon view" window
when something happens that might be of interest in "icon" terms.
There are now some relevant innovations in CVS and snapshots. I'd like
to invite testing and comments. Here's a brief account of each of the
things mentioned above.
1) Script output: when there's a already a script output window open,
we offer a three-way choice of what to do: (a) re-use the existing
window, replacing its content; (b) re-use the window, adding to its
content; (c) leave the old window alone and open a new one for the new
output.
For a long time in gretl's history it was (a) with no choice; then (b)
was requested and implemented some years back; then (c) came along too
and -- I don't quite remember why -- (c) became the default.
Ever since option (b) arrived, a choice has been available via the
"push-pin" icon in the script output window, which pops up a little
dialog. However, this may not be obvious unless you know to look for
it. And for people working with scripts this choice can be quite
important. IMO each of the three options has its place, but if you're
stuck with one that's wrong for you it's liable to be quite annoying,
as follows:
(a) "Huh, gretl just trashed my last output!"
(b) "It's confusing to have output pile up like that!"
(c) "Why does gretl keep opening all these damn windows?!"
So I wanted to make the choice more obvious. The default for a new
installation of gretl is now "none of the above", that is, an "unset"
value for this choice. And if the value is unset then the first time
the choice becomes relevant we pop up a version of the "push-pin"
dialog, with a note pointing out where you can change gretl's
behaviour in future.
For existing gretl installations, if you just went with the default
value (c) that will now be taken as "unset" and you should see the new
dialog when you run a script with a script window open. If you already
changed the setting and you'd like to check out the new dialog you can
edit your ~/.gretl2rc file: set the variable "script_output_policy" to
0. (Look for the "stickiness" line.)
# stickiness of output
script_output_policy = 0
2) icon view: for some time now the default has been to display the
icon view window whenever a model, graph, matrix or bundle icon is
added -- with the option of turning this off under /Tools/Preferences.
Under the default, the thing I found most annoying was having the icon
view pop up whenever I ran a script that generated a matrix. So for
now I've disabled that: simply generating a matrix will not open the
icon view under the default policy.
Any thoughts on that? Does anyone like having the icon view auto-open
for matrices? Should we maybe have a three-position switch: on for all
icons, on for models and graphs only, off for everything?
Allin
10 years, 2 months
gnuplot suggestion/feature request
by Logan Kelly
Hello,
Suggestion for shaded bars on time series plots, i.e. NBER recession . It would be quite nice if you could define shaded bars on a time series plot with a discrete variable. It could look something like
gnuplot varlist --time-series --shading=dummy
where dummy is a discrete variable and taking a value of 0 for all periods with no shading.
Just a thought,
Logan
10 years, 2 months
RE-Logit using R
by Sven Schreiber
Hi,
given that my first attempts to implement panel logit with so-called
random effects have been 95% but not 100% successful I have now written
a wrapper function to outsource this task to R. Given that this is a
potentially computational-intensive task I think it makes sense to incur
the overhead of invoking R.
If somebody likes to test and feed back the results, they're welcome
(see attached).
You need to have R installed and within R you need the "lme4" package to
be present.
The function interface from a gretl user side is pretty straightforward,
you just specify the dependent variable and then the right-hand side in
a list "X". If you want to let lme4's glmer() do Gauss-Hermitian
quadrature you need to specify the number of points in "quadpoints" (or
you set it to zero to let me choose the default number 32), otherwise
with the default 1 it uses a "Laplacian" quadrature:
RElogitR(series y, const list X, int quadpoints[0::1])
The function returns a bundle with all kind of stuff, but this is far
from finished.
Note that in the output you will see from the R side, the jargon from
the lme4 package calls some things "fixed effects", which is probably a
pretty accurate description, but that we in econometrics usually
wouldn't call fixed effects. It has nothing to do with (conditional)
Fixed-Effects-Logit from gretl's fe_logit package for example. It is
really just the standard explanatory variables without the "random effects".
So let's see if this thing works for you.
cheers,
sven
10 years, 2 months
print bug
by Sven Schreiber
Hi,
example:
<hansl>
nulldata 10
a = 3.5
print sqrt(a) # prints workfile data instead
matrix ma = {3.5}
print sqrt(ma) # prints ma instead of root
</hansl>
Very recent snapshot here.
thanks,
sven
10 years, 2 months
bundle assignments and object type
by Sven Schreiber
Hi,
working with bundles, gretl is "too liberal" for my taste:
<hansl>
bundle bb = null
matrix ms = zeros(1,1)
scalar bb.s = ms # want to have scalar
string check = typestr(inbundle(bb,s))
print check # yields "matrix"
</hansl>
You could say, why do expect to get out a scalar if you stuff in a
matrix, but this is for illustration. I'd rather have gretl flag an
error if it doesn't want to comply with my "scalar" assignment. Then I
could do something like 'ms[1,1]' for example.
But my ideal here would be that gretl sees the "scalar" keyword and cast
the 1x1-matrix to a scalar number type.
thanks,
sven
10 years, 2 months
--send-data (with 'foreign'): more control needed
by Sven Schreiber
Hi,
this is a feature request or alternatively a request for help finding
another solution...
When doing
"foreign language=xxx --send-data"
I would like to specify a list of series that is being sent, instead of
the whole dataset, e.g. like this:
"foreign language=xxx --send-data=mylist"
where of course 'mylist' must exist.
This way I could (trivial example ahead) run a regression in R while
controlling from the gretl side the exact variables that I want to use
in there, and _without_ having to know their names within R. Inside R I
would just use the generic 'gretldata' name for all the data that is
passed. The ordering of series/variables inside the list would be
important, however.
Or can this be achieved already somehow?
Thanks,
sven
10 years, 2 months
quadtable() doesn't really have a default type
by Sven Schreiber
Hi,
according to the doc/spec, the quadtable() function should only have the
first argument as mandatory, the second is supposed to have a default
value 1 (Gauss–Hermite).
However, a call with only a single argument (like 'quadtable(32)')
fails, while quadtable(32,1) succeeds.
I guess either the default should be implemented, or the doc should be
adjusted.
thanks,
sven
10 years, 2 months
new string substitution failure
by Sven Schreiber
Hi,
I'm currently editing the function package HIP by Jack and Claudia
Pigini because I have run into various problems using it.
For example if I simply have it converted to a hansl script and then try
to run the automatically included sample function call I get the error
"unexpected @".
The cause is some string substitution after an 'mle' block, below is an
example of this error in a different context.
I guess this is fallout from the new parser? This is with 1.10.0cvs from
Oct 24th on Windows 8.
Thanks,
sven
<hansl>
string bar = "-v"
### below ripped from mle-advanced.inp
nulldata 10000
set optimizer bfgs
# generate artificial data
series x1 = normal()
series x2 = normal()
series x3 = normal()
list X = const x1 x2 x3
series ystar = x1 + x2 + x3 + normal()
series y = (ystar > 0)
matrix b = zeros(nelem(X),1) # initialize b at 0
mle logl = y*ln(P) + (1-y)*ln(1-P)
series ndx = lincomb(X, b)
series P = cnorm(ndx)
params b
end mle @bar
</hansl>
10 years, 2 months