warning: gdt-reading bug
by Allin Cottrell
We've just noticed that a bug was introduced into our code for reading
native gretl .gdt data files in August of this year. The bug should be
triggered only rarely, but we thought it wise to issue a warning.
Description of bug: If a gdt file contains "subnormal" values (that
is, floating point values that are too close to zero to be represented
with the usual precision), then when such a file is read on Linux, the
first subnormal value to be found on a given row (observation) will be
incorrectly copied into the remaining columns (series) on that row.
Example: A gdt file containing 10 series has a subnormal for series
number 5 on row 25. Then when the file is read on Linux, that
subnormal will replace the correct values for series 6 to 10 for
observation 25.
Comment: This won't affect the reading of "primary" data (actual
micro- or macroeconomic measurements), which will never contain
subnormal values (we're talking about absolute values less than 10 to
the minus 307). And the bug is not triggered on MS Windows. However,
subnormal values may be produced by some data transformations (such as
squaring very small numbers, or computing the normal CDF of very big
negative values).
Fix: This is now fixed in the git source for gretl and also the
current snapshots. And we will put out a new release soon, gretl
2015d.
Diagnostic: If you think a dataset may suffer from this problem,
you can run the script checkdata.inp, from
http://ricardo.ecn.wfu.edu/pub/gretl/checkdata.inp
First load the dataset in question. Then open checkdata.inp and run
it. An affected dataset may produce something like this:
<script-output>
Total number of values examined: 164122
Check for subnormal floating-point values
-----------------------------------------
Total number found: 138
Longest (row) sequence: 138
(occurs at obs 210, starting series ID 461)
Number of sequences (of length >= 2): 1
</script-output>
The symptom of a problem is that we find a consecutive sequence of
subnormal values on one or more rows of the dataset. This could occur
for "natural" reasons but it may indicate corruption. Isolated
subnormals don't indicate the bug. And again, most datasets should
contain no subnormal values.
Allin Cottrell
7 years, 11 months
removing nan and inf from a matrix
by Logan Kelly
Hello,
I need to take the log difference of a matrix, i.e. log(M[2 rows(M):,]/M[1:rows(M)-1,]). Unfortunately, M has elements equal to zero. I need to replace the nan's and inf's with 0's. This almost works
M = isnan(M) ? 0 : M
but does not remove inf's. Any sugestions?
8 years, 2 months
Holt-Winters package
by Raul Gimeno
Hello
I've been using the Holt-Winters package but I cannot replicate my
Excel-calculation results with this package.
The starting value from the package for the trend is 245 mine is 166.396. By
running a regression on the full sample I get completely different results
for these starting values, although the same methodology as described in the
help description has been used.
For replication purposes I send my excel spreadsheet and I would be glad to
understand how these starting values have been effectively calculated.
Thank you for your help
Raul Gimeno
**
8 years, 3 months
Error in Loop procedure
by Pindar Os
Hi there,
I’m still working on the restricted OLS regressions and in the meantime even uploaded an early version of a function package that uses a SQP of GNU R and a bootstrap routine to get coeffs and standard errors.
In order to produce a nice show case of the optimization problem I generate all combination of coefficients with a step size of n. If there are 3 coeffs that are >=0 and should sum up to 1 the matrix can be easily generated via loop. Since gretl has a special "for loop" one could use this loop version in order to fill the percentages in the matrix in one step. However, there is a bug. Have a look. I’m using the current x64 snapshot for windows.
Cheers and a nice first Sunday in Advent
Leon
<hansl>
scalar intN_1_a = 50 # step size of 2 percent
scalar intStep = 1/intN_1_a
eval intStep
matrix mCombis = NA
matrix mCombisALL = NA
set stopwatch
loop for i=0..intN_1_a --quiet
loop for j=0..intN_1_a --quiet
if i+j<=intN_1_a
if i+j == 0
mCombisALL = i ~ j ~ (intN_1_a-i-j)
else
mCombisALL |= i ~ j ~ (intN_1_a-i-j)
endif
endif
endloop
endloop
eval $stopwatch/60
eval rows(mCombisALL)
# correct number of rows since
scalar intSum3 = (intN_1_a)*3 + (1+intN_1_a-3+1)*(1+intN_1_a-3)/2
# for three coeefs I found this closed formula, with more it’s another…
eval intSum3
set stopwatch
loop for (i=0; i<=1; i+=intStep) --quiet
loop for (j=0; j<=1; j+=intStep) --quiet
if i+j<=1
if i+j == 0
mCombis = i ~ j ~ (1-i-j)
else
mCombis |= i ~ j ~ (1-i-j)
endif
endif
endloop
endloop
eval rows(mCombis)
eval $stopwatch
# correct number
scalar intSum3 = (intN_1_a)*3 + (1+intN_1_a-3+1)*(1+intN_1_a-3)/2
eval intSum3
# wrong, WHY? The reason has to do with the.xx999 values and the missing 1s.
<hansl>
8 years, 9 months
ODBC data import problems
by Allin Cottrell
Herewith some responses to questions about importing data from ODBC
as raised by Alessandro Astuti in these two postings:
http://lists.wfu.edu/pipermail/gretl-users/2015-November/011310.html
http://lists.wfu.edu/pipermail/gretl-users/2015-November/011348.html
Sorry this has taken a while.
1) Importing string-valued variables
Alessandro writes: "In gretl, importing numeric columns from a db
table works correctly, but I can't figure out how to import character
values columns. For example, my favorite test db is world, the one
containing all the world countries and the cities; I can import in
gretl the columns for population and for gnp, for example, but not the
one containing the names of the countries."
On looking into the code, I see that character (or string) data series
are just not supported by our ODBC importer at present. We'll handle
strings, but only in constructing observation markers for matching
against markers present in the dataset. At present gretl will read
string-valued series only from CSV/text data files or native (gdt or
gdtb) files. You could file a feature request for this; see
https://sourceforge.net/p/gretl/feature-requests/
2) Crash on importation
Alessandro: "what I'm trying to import is the columns of a view with
7223 rows, created starting from a such complex query; the problem is
that when trying to perform this, gretl crashes. I got this code in
my console after gretl imported the penultimate row: *** Error in
`/usr/local/bin/gretl_x11': free(): invalid next size"
I have found, and fixed in git, something that might be responsible
for this problem. If you're able to build gretl from git and try your
import again, that would be great.
--
Allin Cottrell
Department of Economics
Wake Forest University, NC
8 years, 9 months
teste Hansen-Johansen
by Augusta Pelinski
Sabem como posso fazer o teste de cointegração com quebra teste
hansen-johansen no gretl?
--
*Augusta Pelinski Raiher*
*(Docente do curso de Economia e do Programa de Pós-Graduação em Ciências
Sociais na Universidade Estadual de Ponta Grossa)*
8 years, 9 months
Young researchers research prize – IAAE 2016
by Stefano
The ACRI Foundation has established several research prizes (about
€3000/4000 each) in connection with the Third Conference of the
International Association for Applied Econometrics (IAAE
2016), to be held at the University of Milan‐Bicocca on June 22nd‐25th 2016.
Researchers in order to be eligible are required:
1) To be below 40 years old, i.e. being born after 1st of January 1975.
2) To have their paper accepted for presentation at IAAE 2016, either in
a regular or in a poster session, and registered to the conference by
April 18th 2016.
3) To be able to visit for a period of no less than a month,
comprehensive of the days spent at the conference, one of the 28 Italian
institutions belonging to the YITP SIdE‐IAAE2016 network.
More details in the attached announcement.
bye,
Stefano
--
________________________________________________________________________
Stefano Fachin
Professore Ordinario di Statistica Economica
Dip. di Scienze Statistiche
Università di Roma "La Sapienza"
P.le A. Moro 5 - 00185 Roma - Italia
Tel. +39-06-49910834
fax +39-06-49910072
web http://stefanofachin.site.uniroma1.it/
---
Questa e-mail è stata controllata per individuare virus con Avast antivirus.
https://www.avast.com/antivirus
8 years, 9 months
WG: Re: TikZ
by juergen.malitte@t-online.de
Running the given skript on the recommended Internet-page I've got the message:
"C:\Program Files (x86)\gretl\wgnuplot.exe" "C:\Users\malitte\AppData\Roaming\gretl\gpttmp.g09584": exit code 1
Fehler bei Skriptausführung: Stopp
> end plot --output=(a)dotdir/empty.ps
That means: Gretl started "wgnuplot" with the argument "C:\Users\malitte\AppData\Roaming\gretl\gpttmp.g09584" , but no tex-file was generated.
What exactly does Gretl in the command : end plot --output=(a)dotdir/empty.ps ? ?
Greetings Jürgen Malitte
-----Original-Nachricht-----
Betreff: Re: [Gretl-users] TikZ
Datum: 2015-11-20T13:01:40+0100
Von: "Ignacio Diaz-Emparanza" <ignacio.diaz-emparanza(a)ehu.eus>
An: "gretl-users(a)lists.wfu.edu" <gretl-users(a)lists.wfu.edu>
El 20/11/15 a las 12:43, Riccardo (Jack) Lucchetti escribió:> On Fri, 20 Nov 2015, Ignacio Diaz-Emparanza wrote:>>> El 20/11/15 a las 12:18, Ignacio Diaz-Emparanza escribió:>>> I looked at your examples in the wiki. The "slow easy way" works OK.>>> But in the "fast easy way" I only obtain the .plt file. I miss a way>>> to run gnuplot from inside gretl and put the .tex files in the>>> correct place.>> [...]>>> Sorry I just sent the previous message and then got a partial>> solution to these problems. If you put the line>>>> literal cd "@workdir">>>> (or whatever directory you prefer) as the first one in the plot>> environment, all the .tex files go this directory.>> Thanks, Ignacio. I just updated the wiki page. See if it works for you.>> -------------------------------------------------------> Riccardo (Jack) Lucchetti
It works !
And the '--output=(a)dotdir/empty.ps' option is a very good solution.
--
Ignacio Díaz-Emparanza
Departamento de Economía Aplicada III (Econometría y Estadística)
Universidad del País Vasco - Euskalherriko Unibertsitatea, UPV/EHU
Tfno: (+34) 94 601 3732
http://www.ehu.eus/ea3
_______________________________________________
Gretl-users mailing list
Gretl-users(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users
8 years, 9 months
sumif equivalent
by Alessandro Astuti
Hi, is there an excel's sumif equivalent in gretl?
--
Alessandro Astuti
8 years, 9 months
TikZ
by Riccardo (Jack) Lucchetti
Of course we all know that we can use gretl for producing pretty graphs.
Then, you can save them in some format (eg pdf) and include them in your
documents: slides, article, PhD thesis, whatever. We all do that.
However, if you need to customise them, the choice of the TikZ format may
be especially convenient for LaTeX users, since a TikZ file is essentially
a (relatively little) text file in which you can insert graphical
elements, text, TeX maths and so on.
Since turning a gretl graph into a TikZ file is quite easy (thanks to
gnuplot), I wrote a little "how-to" on the gretl wiki.
http://gretlwiki.econ.univpm.it/wiki/index.php/Save_a_gretl_graph_in_TikZ...
I hope this is useful.
-------------------------------------------------------
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
-------------------------------------------------------
8 years, 9 months