dbnomics addon: allow sorting beyond the current window
by Sven Schreiber
Hi,
what I mean is best explained by example:
- open File/Databases/Dbnomics/browse
- Locate and double-click on ECB
- I get a window saying "gretl: ECB datasets" at the top, and at the
bottom "show datasets 1-40 of 91"
When I click on the first column header "Code" on the little arrow, I
can sort the entries alphabetically (increasing or decreasing). That's
fine, but it only considers the 40 datasets in the current window.
That's of limited use, I think. Because typically you want to sort over
the entire set, not the arbitrary portion that happens to fit in the
window.
Similarly, the search facility does not allow to search in the labels of
all ECB datasets, only the current 40. (Or alternatively, going down one
level and search in the selected dataset, which is something different.)
Or am I missing something there?
thanks
sven
2 years, 6 months
small doc issue: genr markers
by Sven Schreiber
Hi,
some months ago I edited the "genr" chapter 10 of the user guide, and in
the introduction 10.1 the goal was to describe all cases where using the
keyword "genr" was actually required. I think at the time nobody noticed
that the special construct "genr markers" was omitted. (It is explained
somewhere else buried in the guide.)
Is that still true, I mean is "genr markers" still necessary for what it
does, or is there another equivalent syntax?
thanks
sven
2 years, 7 months
wrong $system.order after "vecm" ?
by Sven Schreiber
Hi,
consider this example:
<hansl>
open denmark
var 2 LRM LRY -q # printout says "lag order 2"
eval $system.order # gives 2
vecm 2 1 LRM LRY -q # again, printout says "lag order 2"
eval $system.order # gives 1
</hansl>
Of course all this is just a matter of convention, but since "vecm"
expects the lag order parameter as referring to the levels (thus the
same as the corresponding VAR), and the printout also refers to that
levels order, I tend to view this as a bug. Right?
thanks
sven
2 years, 8 months
Why?
by Marcin Błażejowski
Hi,
why below script works fine for integers \in [2,53] and does not work
for interegers >= 54?
Marcin
<hansl>
function matrix dectobitconvert (const scalar num, const scalar n)
x = num
ret = zeros(n, 1)
i = 1
loop while x>0 --quiet
y = x % 2
ret[i++] = y
x -= y
x /= 2
endloop
return transp(mreverse(ret))
end function
############################
function scalar bintodecconvert (const matrix mod_struct, const scalar k)
return sum(mod_struct .* 2 .^ seq(k-1, 0))
end function
############################
lenght = 53 # from 54 we get errors
bindigit = ones(1, lenght)
digit = bintodecconvert(bindigit, lenght)
bindigit2 = dectobitconvert(digit, lenght)
printf "Control1: %d\n", sum(bindigit - bindigit2)
digit2 = bintodecconvert(bindigit2, lenght)
printf "Control1: %d\n", digit - digit2
</hansl>
--
Marcin Błażejowski
2 years, 8 months
seasonal cumulation?
by Sven Schreiber
Hi,
it occurred to me that we have the diff/cum pair of functions, but for
seasonal periodicities we only have sdiff, not "scum" (which maybe
wouldn't be an ideal name anyway ;-)
Maybe the cum() function could be extended with an optional argument
that would allow to invoke a seasonal-step-style cumulation? For
example, for quarterly data the result would be out(t) = in(t) +
in(t-4), such that sdiff(out) would give you back 'in'.
thanks
sven
2 years, 8 months
Re: gretl crash
by Ignacio Diaz-Emparanza
El 24/2/22 a las 16:57, gretl-devel-request(a)gretlml.univpm.it escribió:
>> [...]The version of R seems not to affect. I just upgraded from R 3.6
>> to 4.1.2 obtaining the same crash.
>>
>> I have gretl 2001.c built on august in my laptop (ubuntu 20.04 as
>> well), and this script may be run without problem.
>
> OK, two things. Copy-n-pasting Ignacio's script provokes some weird
> hiccup on mu system because of the indentation (those are not spaces
> nor tabs; God knows what they are. Hexdump gives me "c2 a0"; go figure).
>
> After fixing the indentation, the script runs fine here. Still, a
> crash should never happen.
Thank you Jack, for trying it, but it seems this is not the problem. I
fixed the indentation and gretl continues crashing. I am sending the
file for whether you can see another strange character. (I don't
understand the output of hexdump)
>
> A few extra points:
>
> * The script in fact comes from the User's Guide (chap. 44), not the
> Hansl Primer. Copy-pasting code from the pdf files will give you
> nothing but trouble. This is why recent versions of the User's Guide
> have clickable links to download the example scripts.
Yes, sorry, I was alternating between the two and I must have been
wrong. It's the chapter about R and gretl. I can see now the link to
download the script.
>
> * Not really relevant but... for that kind of stuff (structural time
> series models) it's not necessary to go throuh R anymore, since we
> have the StrucTiSM package ;)
Yes, but it is a good example on how to play jointly with gretl and R
>
>
> * Even less relevant, but... Ignacio: we would value very much your
> opinion on the new GUI element for setting up state space models. A
> model like the one in the example (a Local Linear Trend model) is
> quite easy to handle.
I haven't had a chance to review it yet. I haven't used models in state
space form lately. But I hope to be able to do it soon.
--
Ignacio Díaz-Emparanza
Departamento de Métodos Cuantitativos
Universidad del País Vasco - Euskalherriko Unibertsitatea, UPV/EHU
Tfno: (+34) 94 601 3732
2 years, 8 months
gretl crash
by Ignacio Diaz-Emparanza
I'm getting a reproducible crash when trying to run on my desktop
(Ubuntu linux 20.04 and gretl built yesterday from git)the following
script(which is as is in the "Hansl Primer" guide):
<hansl>
open bjg.gdt
foreign language=R --send-data
y <- gretldata[, "lg"]
strmod <- StructTS(y)
compon <- as.ts(tsSmooth(strmod))
vars <- as.matrix(strmod$coef)
gretl.export(compon)
gretl.export(vars)
end foreign
append @dotdir/compon.csv
rename level lg_level
rename slope lg_slope
rename sea lg_seas
vars = mread("vars.mat", 1)
</hansl>
The version of R seems not to affect. I just upgraded from R 3.6 to
4.1.2 obtaining the same crash.
I have gretl 2001.c built on august in my laptop (ubuntu 20.04 as well),
and this script may be run without problem.
--
Ignacio Díaz-Emparanza
Departamento de Métodos Cuantitativos
Universidad del País Vasco - Euskalherriko Unibertsitatea, UPV/EHU
Tfno: (+34) 94 601 3732
2 years, 8 months
psdroot() error message
by Sven Schreiber
Hi, according to the doc for psdroot(): "If the input matrix is not
square an error is flagged".
This is true but the error message is a very generic "data error", see
for example:
eval psdroot(ones(3,4))
Maybe a more informative message could be arranged?
thanks
sven
2 years, 8 months
side-by-side time series to panel: stack and the GUI
by Sven Schreiber
Hi,
I just had to use the solution from section 4.5 of the user guide
("Panel data specifics") which explains how to convert a time-series
dataset holding the same conceptual variable for different units (e.g.,
countries) into a panel dataset with a single variable ("Side-by-side
time series", on my A4 version on page 23). So that paragraph is very
useful.
Two comments or questions on this:
1) I think it's a quite frequent use case. So would it be possible to
enable this dataset twist in the GUI under the Data menu somehow? Should
I file a feature request?
2) While I was applying the hansl code given in the paragraph, I noticed
that as an interim effect of the stack() function the dataset --which
was still nominally a time-series thing-- got extended with (N-1)*T time
series observations to accommodate the stacked variable. I understand
why that is, but obviously at that point the state of the dataset is
wrong, so I wonder if this could be somehow avoided. For example by
packaging the algorithm for the user such that the interim stage isn't
really made public?
thanks
sven
2 years, 8 months