panel data issues
by Sven Schreiber

Hello all panel-interested people,
while using gretl for teaching with panel data (which I hadn't done much
before) I noticed the following, let's say, interface nuisances compared
to the usual luxury gretl offers for time series:
1: The sample and/or range in the main window (bottom) are given as pure
index numbers, even if "panel data marker strings" (cf. user guide p.23)
are defined. At least for the time dimension it would be useful to show
the sample periods in a human-readable form (through the markers). Also,
I noticed that the period numbers shown do not always coincide with the
values of the "time" index variable, if subsampling is in effect. (Seen
in the CEL.gdt dataset after applying the sample restriction year>1970
for example.)
1b: A slightly more general suggestion, also for non-panel data: The
active sample restriction criterion could be shown next to the resulting
active sample in the main window. (At least for simple restrictions,
maybe not for complex, multiple ones.)
2: Menu Sample -> Set range: Only the group range can be chosen, not the
periods. Actually, given the often arbitrary ordering of groups, this is
really the less useful dimension to choose a contiguous range from. (I
know I can use "set sample based on criterion" for periods, but that's
not the point.)
3: About pshrink(): A version that returns a full panel series (with
repeated values like pmean() etc.) could be useful -- practical example:
in growth regressions one needs the initial value of output-per-worker
as a regressor. Also maybe it should be called "pfirst()" or something
instead.
4: Time-constant variables: I'm not sure how to create variables that
only vary along the cross-section, like it is done with the built-in
pmean() etc. functions. Or how to append them (like the user guide p.114
"adding a time series", but along the other panel dimension).
5: Constant in a fixed-effects regression: I don't understand what gretl
reports as the global constant term in a fixed-effects model, and it
doesn't seem to be defined in the guide. It's also confusing that gretl
complains if one wants to discard the constant in the specification
dialog (when fixed effects are selected). (But obviously gretl
estimates the right thing as the comparison with explicit LSDV
regression shows, just the constant is mysterious -- even if it's the
average of the fixed effects it's not clear where the standard errors
come from.)
6: Lags not showing in model spec dialog when sample is restricted to a
single period: If I restrict the CEL.gdt data with year==1985, I cannot
include any previously created lags (of y for example) in the
regression, because they don't show up in the variable selector. Because
the subsampled dataset is now treated as "undated", there's also no
"lags..." button in the dialog. -- Actually I don't understand why gretl
"temporarily forgets" the panel structure of the dataset when a single
period is active. It would seem less problematic to treat even a T=1
sample as a special case of panel data if the underlying dataset has a
panel structure; especially in conjunction with point 1 above about
showing the selected periods in the sample.
Ok, that was a long post, sorry, but still necessary I think.
Cheers,
Sven
6 years, 7 months

interface problem with function packages
by Sven Schreiber

Hi,
[latest snapshot on Win7]
I'm working on the final touches (hopefully) of a function package and
I'm noticing the following:
The public function has three list args, two of them have a default
value of null. In the GUI, when I define the new list to pass as the
first (non-null) arg, this new list appears in all the list argument
fields, including the two where I want to keep the null value. Slightly
annoying.
Also, whenever I edit the code and save the package, gretl pops up a
window saying "changes will take effect on restart". But actually the
changes seem to be active right away, without restarting anything!
thanks,
sven
7 years, 9 months

line wrapping
by Sven Schreiber

Hi,
I tried to wrap this long line:
c3 = sum(diag((((I(rows(P))-P)*Vpsi)**P)/(I(rows(P)^2)-P**P))) +
sum(diag((P/(I(rows(P))+P))*Vpsi))
at the + sign like this:
c3 = sum(diag((((I(rows(P))-P)*Vpsi)**P)/(I(rows(P)^2)-P**P))) \
+ sum(diag((P/(I(rows(P))+P))*Vpsi))
but gretl gave me a syntax error (within a function package), and I
don't really understand why. A bug?
thanks,
sven
7 years, 9 months

Minimum Gretl version
by Andreas Noack Jensen

I cannot set any of the last two counters in the package GUI to more than 9
and I would like to have the latest Gretl (1.9.12) as minimum requirement.
Best
Andreas Noack Jensen
7 years, 9 months

experiment in CVS
by Allin Cottrell

This is partly in response to something Ignacio asked for a
while ago, namely the ability to produce within a function
package, plots that are usually only available via GUI means.
What I have in CVS is just at the proof of concept stage, but
here's the concept:
1) Parallel to certain commands, we offer a function that
returns the information needed to produce a plot, in the form
of a bundle. In this bundle we record the name of the built-in
function that produced it.
2) We provide a built-in function (or maybe eventually a
command) that produces a plot from such a bundle: it checks
for the creator of the bundle and hands off to the appropriate
specialized plotting function.
Right now this is (partially) implemented for the irf()
function. Until now this function has returned a matrix, but
in CVS it returns a bundle which contains the matrix along
with the additional info needed for the plot (e.g. the names
of the target and shock variables and the "alpha" for the
confidence interval, if any).
Isn't this backward incompatible? Actually, no. You can still
assign from the irf() function to a matrix. That's because
I've added a special bundle key: if you add a matrix to a
bundle under the name "payload_matrix", then the following
sort of thing (a "cast" from bundle to matrix) will work:
<hansl>
bundle b
b["payload_matrix"] = I(3)
b["otherthing"] = "hello"
matrix m = b
</hansl>
Here's an example of the whole deal:
<hansl>
open data9-7
var 4 UNEMP PRIME
# assign from irf() to bundle
bundle b = irf(1, 2, 0.2)
bplot(b, "display")
# we can still assign from irf() to matrix
matrix m = irf(1, 2, 0.2)
m
</hansl>
The second (string) argument to bplot() is currently just a
dummy and is ignored. The idea is that you should be able to
use it to specify the format/destination of the plot but
that's not wired up yet.
The reason I say "bplot" (or whatever we decide to name it)
should perhaps be a command rather than a function is that
then one could direct it to a GUI object if desired, as in
graph1 <- bplot bundle
(Or I guess we could use a --bundle=foo option with the
existing "gnuplot" command, though maybe it's already
overburdened with options.)
In relation to Ignacio's request, we could add corrgm() and
pergm() functions that return bundles, and add support for
plotting from such bundles.
Allin
7 years, 9 months

catch restrict seems not to work
by artur tarassow

Hi,
I am simulating time series using a bootstrap procedure and estimate
long-run restricted VECMs. For some iterations the imposed restrictions
fail and I obtain the error "Exact or near collinearity encountered" and
gretl stops, despite the fact that I used the "catch" command:
catch restrict --full #--silent
...
end restrict
Artur
7 years, 9 months

strange bug (due to bundles?)
by Sven Schreiber

Hi,
I think I found a bug in gretl that is quite subtle. The attached script
demonstrates the bug -- or actually in its current form it demonstrates
how to work around the bug. If you run it like this, it will produce the
desired output; especially important is the fact that in the three
iterations the printed "variant1" matrix changes.
In order to trigger the bug, comment out the lines with the
corresponding remark and uncomment the ones with the other remark
(self-explanatory I hope). The symptom is that now the different
"variant1" matrices are identical. Unfortunately the script still is
quite complex for a minimal script.
The only difference between the commented-out and active lines AFAICS is
whether some matrices are directly created and manipulated as bundle
members, or I work with temp matrices that only in the end (of the
function) are assigned to new bundle member items. In this script a fair
amount of bundles are created, passed around between functions, and also
manipulated in loops within functions. This somehow seems to confuse
gretl.
thanks,
Sven
7 years, 9 months

problem compiling gretl-ref.pdf
by artur tarassow

Since a while I obtain an error message trying to compile gretl-ref.pdf.
The concrete error message is:
--------------------
! Text line contains an invalid character.
l.86 ^^@
^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^...
?
! Emergency stop.
l.86 ^^@
^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^...
! ==> Fatal error occurred, no output PDF file produced!
Transcript written on gretl-ref.log.
make[2]: *** [gretl-ref.pdf] Fehler 1
make[2]: *** Warte auf noch nicht beendete Prozesse...
! Text line contains an invalid character.
l.86 ^^@^^@
^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^@^^...
-----------------------
I also attached the "gretl-ref.log" file for more information.
Artur
7 years, 9 months

Function packages "Data requirement" issue
by Marcin Błażejowski

Hi,
suppose we have package for quarterly or monthly time-series and we set
such type of data in "Data requirement" option in function packages main
window. Next if we load i.e. 'bjg.gdt' dataset and try to run our
package we get an error: "This function needs quarterly or monthly data".
Best Regards,
Marcin
--
Marcin Błażejowski
GG: 203127
7 years, 10 months