I just uploaded to youtube an instructional video on how to use the newly
released 2018b version to grab data from db.nomics. The address is:
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
Dear Gretl Community,
I'm trying to download and open some Banco Central do Brasil (BCB)
data using its API and I don't know if there's a more "ellegant" way
to achieve that goal. Please take a look at the code I'm using now:
string str_csv =
# It is possible to download data using json format using this:
string str_csv = strsub(str_csv, "data", "")
string str_csv = regsub(str_csv, "\"", "") # <--- it doesn't work with
the strsub function.
outfile "data.csv" --quiet
the contributed function package "ghosts" has just been updated to
version 0.2 by its author Jack (thanks!).
The reason I'm posting this here is that the new version requires the
brand new gretl 2018b for internal technical reasons. So if you have
been using the previous ghosts 0.12, you would either have to make sure
to save a local copy of the package for yourself to keep working with an
earlier gretl version; or (recommended) update your gretl installation
to the latest 2018b.
(BTW, most of you probably don't know about this ghosts package yet, so
here's the abstract from its help file:
The name of this package is an acronym, that stands for Gretl/Hansl
Offering for Spectra of Time Series. Apart from giving the user the most
common tools for spectral analysis of time series, the package also includes
a few user-level functions for handling matrices with complex-valued
I've recently had cause to look up some US macroeconomic data for
the 1930s, and was reminded of something: I never got around to
converting all the NBER Macrohistory data to gretl database format.
That's now corrected: there are gretl databases for all 16
"chapters" on our database server.
To see what's there:
"/File/databases/on database server" in gretl.
In constructing the gretl files I used the ".db" versions of the
individual NBER series. This is a plain text format with metadata in
a reasonably simple format. However, I skipped some of the .db files
that seemed broken. This was for two main reasons:
* In some cases the number of observations is not consistent with
the reported starting and ending dates and frequency, so I don't
know how to place the data on the timeline.
* In some cases there's no definition or description of the series,
just an NBER ID number, and I can't find a table that tells me what
these numbers mean.
There are lots of series, and these two problems exclude only a
small proportion of them.
While writing up some teaching notes, I discovered that the following causes Gretl to crash:
summary --simple --by=Selfempl
On further review, it seems to be the --by option that's the problem. This is on Windows 7, Gretl 2018b built 2018-03-23 (64-bit).
[High Point University logo]
Dr. Peter M. Summers | Associate Professor
One University Parkway, High Point, NC 27268
Office: 336-841-9650 | Department of Economics
Choose to be extraordinary!(r)
[Facebook logo]<https://www.facebook.com/HighPointU>[Twitter logo]<https://twitter.com/HighPointU>[Instagram logo]<http://instagram.com/highpointu>[LinkedIn logo]<https://www.linkedin.com/school/28206>
Artur gave a piece of hansl script that he reckoned ought to work
but which in fact failed, namely creation of a list of first lags
by direct reference to a list of series contained in a bundle:
open denmark.gdt -q
list L = LRM LRY
bundle b = null
b.L = L
b.L1 = b.L(-1) # fails here
In my initial reply I gave a rationalization for why this wouldn't
work, but I now think I was mistaken, or at least almost mistaken!
Another formulation in the close neighborhood works OK, namely
that using the lags() function:
b.L1 = lags(1, b.L)
so why shouldn't the shorthand employed by Artur work too? Well,
there's one long-standing blockage: to use notation such as "(-1)"
to indicate taking a lag, either the term to the left must be a
named series, or -- if it's a list rather than a series -- you must
flag your intention to create a list by using the "list" keyword.
So, even ignoring bundles, (a) below works but (b) doesn't
open denmark.gdt -q
list L = LRM LRY
list L1 = L(-1) # (a), OK
L2 = L(-1) # (b), fails
If you're with me so far, here's the next step. It then seems that
the following should work in Artur's context:
# ought to work, right?
list b.L1 = b.L(-1) # with "list" out front
but that also failed. And that, I'd say, was a bug (or at least a
missing feature). So it's now fixed in git.
A list inside a bundle should be usable in the same sort of way as a
list "on the loose", provided it validates as a list in the context
of the current dataset (that is, none of the series ID numbers it
contains are out of bounds).
I would like to store multiple 2-d matrices in an array which is part of
a bundle. However, I've experienced the following issues and would like
to know whether this intended or a bug:
# working example
matrices M = null
M += mnormal(10,1)
# not properly working example
bundle b = null
matrices b.M = null # doesn't work
b.M = M # works
b.M += mnormal(10,1) # doesn't work
matrix mn = mnormal(10,1)
b.M += mn # doesn't work