curious bug
by Riccardo (Jack) Lucchetti
Hi all,
being the king of the typo has its advantages: for example, you find weird
bugs:
<hansl>
nulldata 60
setobs 4 1:1
y = normal()
ols y 0 y(0 -to -1) # note the typo
ols y 0 y(1)
</hansl>
The two models are identical.
-------------------------------------------------------
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
questions about Artur's calendar_utils package
by Sven Schreiber
Hi Artur (and everybody who's interested),
I'm trying to leverage your calendar-related package and have some
questions, especially about the function date_to_iso8601. First of all,
it would be useful if the doc explained a little bit more what's
actually supported. Internally the function uses the built-in strptime
and so on, so maybe it would be enough to refer to gretl's function
reference for that.
Then, I'm observing that the result for date_to_iso8601("1984", "%Y")
is: 19831231. Is this a bug? I would have expected 19840101.
Next, my feature request would be to support other date specifications
used by gretl as well, such as for quarterly data things like "1974:3".
(It does work with such monthly specifications, apart from an apparent
bug similar to the one above.) I'm aware that quarterly data isn't
covered by ISO8601.
At the end of this message is a code proposal on how to deal with such
quarterly labels. Your date_to_iso8601 function could perhaps allow a
"Q" code in the date_format argument and do something like this:
if instring(toupper(date_format), "Q")
scalar iso8601 = gretlquarter_to_iso8601(date)
else
... < existing part of your function>
endif
What do you think?
thanks
sven
------
<hansl>
function scalar gretlquarter_to_iso8601(string date)
# This function only supports quarterly date strings
# as used and accepted by gretl itself;
# basically only patterns like "1999:3" or "1999.3".
errorif(!instring(date, ":") && !instring(date, "."), \
"not a recognized quarterly date string")
# harmonize and check
date = strstrip(strsub(date, ".", ":"))
strings parts = strsplit(date, ":")
errorif(nelem(parts) != 2, "invalid date string input")
# convert (and check)
year = atof(parts[1])
quarter = atof(parts[2])
errorif(year < 1000 || year > 9999, "year out of range")
errorif(quarter < 1 || quarter > 4, "quarter out of range")
# construct the ISO output
out = year * 10000 # year
out += ((quarter-1) * 3 + 1) * 100 # first month in quarter
out += 1 # first day in month
return out
end function
# some tests
eval gretlquarter_to_iso8601("2004:4")
eval gretlquarter_to_iso8601("20000:1") # wrong
eval gretlquarter_to_iso8601("2000-3") # also wrong
eval gretlquarter_to_iso8601("1901:12") # wrong
eval gretlquarter_to_iso8601("1900:3")
</hansl>
3 years, 2 months
some panel plotting mysteries
by Sven Schreiber
Hi,
[actually, it's only one mystery, the rest is missing features...]
I have a panel dataset with 9 groups (countries) and 44 time periods.
The data structure has been set (or refined) with:
setobs 4 1995:1 --panel-time
setobs country --panel-groups
where "country" is a string-valued series with the two-letter ISO codes
for the 9 countries.
Now I'm observing some glitches or a little mysterious outcomes when
calling up various plot options in gretl. (There are no missing data in
the panel, and if it matters, currently I have the comma as decimal
separator.)
1) Context menu (right click) and then choose "panel plot"; then choose
"joint/groups overlapping": The legend is fine, using the country code
labels. But the x-axis --which should be time-- shows a range from 1 to
2, which I don't understand. Simply a bug? (The same problem occurs for
"joint/group means".)
2) Again context menu, "panel plot", but then choose "joint/groups
sequentially": Now the x-axis has tick marks indicating the groups, but
instead of the string-valued country labels I only get numbers 1 through
9, which is a not wrong, but a bit of a pity.
3) ... then choose "multiple plots in grid": Again group numbers instead
of labels, and on the time axes there is always 1 through 44 (actually,
0-45, but well) instead of the corresponding date labels from the panel
time.
4) ... then choose "boxplots per group" (that's also what I get on
double-clicking the series directly): Like in case (2), group numbers
1-9 on the x-axis instead of the group (country) labels.
thanks
sven
3 years, 2 months
kpss observations/issues
by Sven Schreiber
Hi,
sorry for reporting a bunch of quirks so close to the release, it's not
intentional.
Anyway, in actual use of the 'kpss' command I'm stumbling over the
following things:
- (extremely minor) The doc could mention that the usual $test and (if
applicable) $pvalue accessors can be used after running the test command.
- The $test accessor contains NA when running in a panel context.
(Example: 'kpss 3 invest' on the grunfeld dataset, and then look at
$test.) OK, the printout reveals three different test statistics, so
perhaps it would have to become a matrix instead of a scalar.
- Using automatic bandwidth choice in a panel yields glitch in the
output: For example, doing 'kpss -1 invest' runs fine, and according to
the doc it triggers automatic lag order (window size) choice. However,
in the printout the "-1" is repeated verbatim, whereas in a plain
time-series context the actually chosen value is displayed.
(But BTW, when restricting the sample to one unit from the panel, the
kpss command works nicely as expected in a time-series context.)
thanks
sven
3 years, 2 months
small error and a suggestion
by Ignacio Diaz-Emparanza
Hi,
I have just started teaching a basic econometric class.
I found an error in gretl GUI: when you have a qualitative variable, you
obtain the dummies for this variable and try to define a new variable,
for example multiplying one of the dummies by another variable
(quantitative or dummy from other qualitative). You will go now to the
menu "Add->Define new variable", you write a new name and a '=' but now
if you click on the name of the dummy for building the operation, the
name written into the dialog is the name of the original (qualitative),
not the name of the dummy. For doing this correctly you have to write
the name of the dummy by hand.
The suggestion is about the scatterplot. Normally, when I start a new
class on Econometrics, I like to show the scatterplot of two variables
for illustrating the linear relationship. But it is a litte bit
uncomfortable that the gretl scatterplot by default shows the OLS
estimated line. I suggest to put this line as an option, may be in the
same dialog in which you have to select the variable for X axis.
Ignacio
3 years, 2 months
special syntax for "end of matrix"
by Riccardo (Jack) Lucchetti
The recent fix to the biprobit command led me to think about the fact that
we currently don't have a way to indicate the element of a matrix that is
second-from-last, third-from-last, etc.
At present we have to use contructs like
<hansl>
b = a[3:rows(a)-1]
</hansl>
In matlab, you can use the "end" keyword, as in
<matlab>
b = a(3:end-1)
</matlab>
I was wondering if we could have the same syntax (and ideally extend it to
other multidimensional objects, such as arrays). After all, "end" is
already a reserved word, so there's no risk of "end" being a pre-existing
identifier. This feature would probably complicate a bit the handling of
the matrix slicing syntax, but I guess it's doable.
Question #1: is this desirable? (My answer: yes) Question #2: is this
doable? (I guess it is) Question #3: is this worth implementing for 2021d,
which is going to be out soon? (maybe not).
-------------------------------------------------------
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, 2 months
Oh no! Another chat service. gretl - slack
by Hélio Guilherme
Hello,
I have been using for some years now the Slack chat system, in several Open
Source projects, but also the paid version on the companies I have been
working for, or customers.
So we can instant chat in channels or directly to members or group chat up
to 5 people.
We can transfer files. (I even use it to transfer from my Linux or Mac to a
Windows machine).
We can do video/voice calls.
We lose the history of chats after some time, because it is the free
version. Important conversations should be stored on some permanent medium
(like email/mailing list). We can apply for the Pro plan for free if with
less than 250 members.
In no way this is a replacement for the mailing lists.
This is an invitation link that will expire in 60days (or so):
https://join.slack.com/t/gretlgnuecono-vxh1344/shared_invite/zt-waoqek6r-...
Hope you find it useful.
Hélio
3 years, 2 months
sscanf -> segfault
by Riccardo (Jack) Lucchetti
The "sscanf" command is deprecated, so this is probably not very
important, however: I just discovered a way to trigger a segfault. Just
open a console or gretlcli, type "sscanf" and hit Enter. Boom.
Fortunately, the fix was easy and I just pushed it to git.
-------------------------------------------------------
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, 2 months
lost cursor in console after "open"
by Sven Schreiber
Hi,
on Linux (in a VM) with current git I'm experiencing the following:
- I have the console "swallowed"
- I type "open denmark"
-> The focus on the console is lost (no cursor), I cannot type another
command. (So I have to click into the console to get the cursor back there.)
With other commands the problem does not seem arise.
(I don't have a recent Windows snapshot here right now to check. With an
older snapshot there is no such problem.)
thanks
sven
3 years, 2 months