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, 12 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, 3 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, 4 months
X-12-ARIMA 64bits
by Carlos Andrade
Hello Gretl users,
I installed the 1.9.92 version of Gretl Linux x86_64 in Debian 8 AMD64.
Where do I find the x86_64 version of X-12-ARIMA for Gretl 1.9.92?
Thanks.
--
Atenciosamente,
Prof. Carlos A. S. de Andrade
LAPEA - Laboratório de Pesquisa em Economia Aplicada e Engenharia de
Produção
Universidade Federal de Campina Grande.
Centro de Humanidades
Unidade Acadêmica de Economia
8 years, 10 months
Boxplot, automation, constant, work-around?
by Schaff, Frederik
Hello,
I am running a script to automatically generate some large amount of boxplots, e.g.
<hansl>
list DistEff8 = DistributiveEfficiency_min .. DistributiveEfficiency_MAE #The list of the variables
"Distributive Efficiency" <- boxplot DistEff8 --output=display { set ylabel "Distributive efficiency"; set xlabel ""; set title "Distribution of distributive efficiency"; unset label; set xtics ("min" 1, "1Q" 2, "median" 3, "3Q" 4, "max" 5, "mean" 6, "RMSE" 7, "MAE" 8) scale 0.0; }
< /hansl >
Now it might sometimes be the case (especially if I restrict the sample) that some of these values, like the median, become constant expressions. Atm I need to refine the script manually (excluding the constant variable) each time this happens. At the same time, I lose all the information regarding the median, say, in the boxplot that is produced. Is there a way to allow the boxplot command to draw a "constant" boxplot?
I guess a work-around would be to simply add a very small random number, say U=1e-100, to each of the values of the series before sending it to the boxplot. Unfortunately I do not know how to automate this. Is there an easy way to provide some function like "NonConstList(list or series) " which I could wrap around my list before plotting (and that does not alter the original data, i.e. creates a temporary new list each time)?
Something like:
<hansl>
list DistEff8 = DistributiveEfficiency_min .. DistributiveEfficiency_MAE #The list of the variables
"Distributive Efficiency" <- boxplot NonConstList (DistEff8) --output=display ...
< /hansl >
PS: I possed this question a few days ago but I guess it wasn't recognised because I added it to an old thread. Sorry for that
Many thanks!
Frederik
------------
Frederik Schaff, Dipl.-Volkswirt
University of Hagen
Department of Business and Economics
Chair of Economic Theory (Prof. A. Endres)
Universitätsstraße 11 (TGZ)
58097 Hagen
Phone: +49 (0) 2331 987-4454
E-Mail: Frederik.Schaff(a)FernUni-Hagen.de
http://www.fernuni-hagen.de/wirtschaftstheorie/en/team/frederik.schaff.shtml
8 years, 11 months
Citation
by obasadurotimi@yahoo.com
How can gretl 2015d be cited in a research work in text refrencing and refrences citation?
Sent from my BlackBerry® wireless handheld from Glo Mobile.
8 years, 11 months
Git updating
by Clive Nicholas
Updating -gretl- has gone well, so far. But is this normal?
clive@clivubu:~/gretl-git$ sudo git config --global push.default simple
clive@clivubu:~/gretl-git$ sudo git pull
Already up-to-date.
clive@clivubu:~/gretl-git$ sudo git commit -a
On branch master
Your branch is up-to-date with 'origin/master'.
Untracked files:
Makefile
build.h
builddate
cli/.deps/
cli/.libs/
cli/Makefile
cli/complete.o
cli/debug
cli/gretlcli
cli/gretlcli.o
config.h
config.log
config.status
doc/Makefile
doc/commands/.libs/
doc/commands/Makefile
doc/commands/bbl2txt
doc/commands/cmdtex
[...]
tests/Makefile
utils/emacs/Makefile
xdg/Makefile
xdg/gretl.desktop
nothing added to commit but untracked files present
clive@clivubu:~/gretl-git$ sudo git push
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
That's not happened before and this is a clean gretl-git folder from Sunday
night. Thoughts?
--
Clive Nicholas
"My colleagues in the social sciences talk a great deal about methodology.
I prefer to call it style." -- Freeman J. Dyson
8 years, 11 months
Installation error on -gretl- 2015d
by Clive Nicholas
All,
I'm getting an installation error for the new version of -gretl- and I'm
following Jack's suggested code from a few weeks' back as well.
Ultimately, it's complaining that it cannot find the Makefile:
config.status: error: cannot find input file: `doc/commands/Makefile.in'
It happened when I was on Kubuntu 14.10 and is still happening after just
upgraded to 15.10. See (rather long) output below:
clive@clivubu:~$ wget
http://prdownloads.sourceforge.net/gretl/gretl-2015d.tar.xz
--2015-10-24 18:04:00--
http://prdownloads.sourceforge.net/gretl/gretl-2015d.tar.xz
Resolving prdownloads.sourceforge.net (prdownloads.sourceforge.net)...
216.34.181.59
Connecting to prdownloads.sourceforge.net
(prdownloads.sourceforge.net)|216.34.181.59|:80...
connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location:
http://downloads.sourceforge.net/project/gretl/gretl/2015d/gretl-2015d.ta...
[following]
--2015-10-24 18:04:00--
http://downloads.sourceforge.net/project/gretl/gretl/2015d/gretl-2015d.ta...
Resolving downloads.sourceforge.net (downloads.sourceforge.net)...
216.34.181.59
Connecting to downloads.sourceforge.net
(downloads.sourceforge.net)|216.34.181.59|:80...
connected.
HTTP request sent, awaiting response... 302 Found
Location:
http://netassist.dl.sourceforge.net/project/gretl/gretl/2015d/gretl-2015d...
[following]
--2015-10-24 18:04:01--
http://netassist.dl.sourceforge.net/project/gretl/gretl/2015d/gretl-2015d...
Resolving netassist.dl.sourceforge.net (netassist.dl.sourceforge.net)...
62.205.134.42, 2a01:d0:0:37::2
Connecting to netassist.dl.sourceforge.net
(netassist.dl.sourceforge.net)|62.205.134.42|:80...
connected.
HTTP request sent, awaiting response... 200 OK
Length: 8917020 (8.5M) [application/octet-stream]
Saving to: ‘gretl-2015d.tar.xz’
gretl-2015d.tar.xz
100%[=========================================================================================================>]
8.50M 369KB/s in 39s
2015-10-24 18:04:40 (223 KB/s) - ‘gretl-2015d.tar.xz’ saved
[8917020/8917020]
clive@clivubu:~$ tar xf gretl-2015d.tar.xz
clive@clivubu:~$ cd gretl-2015d
clive@clivubu:~/gretl-2015d$ more README.packages
This file aims to ease finding the required packages as mentioned
in the gretl dependencies file (http://gretl.sourceforge.net/depend.html)
for different Linux distributions. Please consult the Appendix C2 of
Gretl's User Guide for detailed information.
Each entry is the appropriate shell command to obtain the
packages
needed for building libgretl, gretlcli and
gretl_x11.
It is organized by Linux distribution and expects your
contributions
to validate and expand to new
distributions.
Helio Guilherme, 23 September
2011
-----
OpenSUSE 13.1 (contrib.
2014-01-15)
#
dependencies
sudo zypper install cvs gcc
make
sudo zypper install gmp-devel mpfr-devel fftw3-devel lapack-devel
\
gnuplot libxml2-devel curl-devel readline-devel gtk3-devel
gtksourceview-devel
# documentation build (optional) - WARNING ~= 1GB in
disk
sudo zypper install texlive libxslt-devel
texlive-appendix
CentOS 6.4 (contrib. 2013-11-27)
# dependencies
sudo yum install gmp-devel mpfr-devel fftw3-devel lapack-devel \
gnuplot libxml2-devel curl-devel readline-devel gtksourceview2-devel
# documentation build (optional)
sudo yum install texlive libxslt-devel texlive-latex
Fedora 19 (contrib. 2013-11-23)
# dependencies
sudo yum install gcc gmp-devel mpfr-devel fftw3-devel lapack-devel \
gnuplot libxml2-devel curl-devel readline-devel gtksourceview3-devel
#optional (did not work)
sudo yum install libgsf-devel
#optional (1.9.91 contrib. 2014-05-15)
sudo yum install json-glib-devel
# documentation build (optional)
sudo yum install texlive libxslt-devel texlive-appendix
# language dependency for example
texlive-babel-portuges
Linux Mint 12 (contrib. 2012-02-26)
Ubuntu oneiric (11.10) (contrib. 2012-06-10, helio_guilherme(a)hotmail.com)
# dependencies
sudo apt-get install gnuplot libfftw3-dev liblapack-dev gfortran libxml2 \
zlib1g-dev libreadline-gplv2-dev libgtksourceview2.0-dev libgmp3-dev curl \
libcurl4-gnutls-dev
# documentation build (optional)
Ubuntu Precise (12.04) LTS (contrib. 2014-05-28)
#optional (1.9.91 contrib. 2014-05-28)
sudo apt-get install libjson-glib-dev
Ubuntu natty (11.04) (contrib. 2011-09-23, helio_guilherme(a)hotmail.com)
# dependencies
sudo apt-get install gnuplot libfftw3-dev liblapack-dev gfortran libxml2 \
zlib1g-dev libreadline5-dev libgtksourceview2.0-dev libgmp3-dev
# documentation build (optional)
sudo apt-get install texlive texlive-latex-extra libxslt1-dev
clive@clivubu:~/gretl-2015d$ sudo apt-get build-dep gretl
[sudo] password for clive:
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
clive@clivubu:~/gretl-2015d$ ./configure --prefix=/usr/local
--enable-quiet-build --enable-openmp --enable-build-doc
configuring for gretl 2015d (library version 15.0.0)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking whether make sets $(MAKE)... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for a sed that does not truncate output... /bin/sed
checking whether NLS is requested... yes
checking for msgfmt... /usr/bin/msgfmt
checking for gmsgfmt... /usr/bin/msgfmt
checking for xgettext... /usr/bin/xgettext
checking for msgmerge... /usr/bin/msgmerge
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for shared library run path origin... done
checking for CFPreferencesCopyAppValue... no
checking for CFLocaleCopyCurrent... no
checking for GNU gettext in libc... yes
checking whether to use NLS... yes
checking where the gettext function comes from... libc
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to
x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain
format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... no
checking for mawk... mawk
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared
libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for shl_load... no
checking for shl_load in -ldld... no
checking for dlopen... no
checking for dlopen in -ldl... yes
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... no
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking whether ln -s works... yes
checking for sin in -lm... yes
checking for fopen in -lc... yes
checking for ANSI C header files... (cached) yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for stdint.h... (cached) yes
checking for unistd.h... (cached) yes
checking dirent.h usability... yes
checking dirent.h presence... yes
checking for dirent.h... yes
checking fnmatch.h usability... yes
checking fnmatch.h presence... yes
checking for fnmatch.h... yes
checking fenv.h usability... yes
checking fenv.h presence... yes
checking for fenv.h... yes
checking byteswap.h usability... yes
checking byteswap.h presence... yes
checking for byteswap.h... yes
checking sys/times.h usability... yes
checking sys/times.h presence... yes
checking for sys/times.h... yes
checking libproc.h usability... no
checking libproc.h presence... no
checking for libproc.h... no
checking sys/proc_info.h usability... no
checking sys/proc_info.h presence... no
checking for sys/proc_info.h... no
checking for an ANSI C-conforming const... yes
checking for long double with more range or precision than double... yes
checking for vasprintf... yes
checking for posix_memalign... yes
checking size of int... 4
checking return type of signal handlers... void
checking whether byte ordering is bigendian... no
checking whether to use SSE2... yes
checking whether to use AVX... yes
checking whether to use OpenMP... yes
checking immintrin.h usability... yes
checking immintrin.h presence... yes
checking for immintrin.h... yes
checking for mpicc... no
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking for struct sockaddr_in... yes
checking for struct in_addr... yes
checking readline/readline.h usability... yes
checking readline/readline.h presence... yes
checking for readline/readline.h... yes
checking for tgetent in -lncurses... yes
checking for readline in -lreadline... yes
checking for rl_completion_matches in -lreadline... yes
checking for xdg-mime... yes
checking for mmap... yes
checking for gzopen in -lz... yes
checking for GMP - version >= 4.0.1... yes
checking for MPFR - version >= 2.2.0... yes
checking for libgfortran... checking for _gfortran_abort in -lgfortran...
yes
checking for LAPACK... yes
checking for dgejsv_ in -llapack... yes
checking for gnuplot... yes
checking for gnuplot >= 4.4.0 with PNG support... yes
checking for pdflatex... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for FFTW... yes
checking for CURL... yes
checking for GLIB... yes
checking for GLIB28... yes
checking for JSON_GLIB... yes
checking for GTK3... no
GTK 3 >= 3.0.1 not found
checking for GTK2... yes
checking for GTKSPINNER... yes
checking for GTKSOURCEVIEW... yes
checking for GDK_PIXBUF... yes
checking for XML... yes
checking for XSLT... yes
checking for RLIB... yes
checking whether CC supports -Wno-deprecated-declarations... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating gretl_sh
config.status: creating gretl.pc
config.status: creating gui2/Makefile
config.status: creating gui2/debug
config.status: creating xdg/gretl.desktop
config.status: creating xdg/Makefile
config.status: creating cli/Makefile
config.status: creating cli/debug
config.status: creating lib/Makefile
config.status: creating plugin/Makefile
config.status: creating po/Makefile.in
config.status: creating share/Makefile
config.status: creating share/bcih/Makefile
config.status: creating tests/Makefile
config.status: creating extra/Makefile
config.status: creating osx/Makefile
config.status: creating osx/gretl.sh
config.status: creating osx/fixlinks.sh
config.status: creating osx/Info.plist
config.status: creating redhat/gretl.spec
config.status: creating utils/emacs/Makefile
config.status: creating config.h
config.status: executing po-directories commands
config.status: creating po/POTFILES
config.status: creating po/Makefile
config.status: executing libtool commands
configure: creating ./config.status
config.status: creating Makefile
config.status: creating gretl_sh
config.status: creating gretl.pc
config.status: creating gui2/Makefile
config.status: creating gui2/debug
config.status: creating xdg/gretl.desktop
config.status: creating xdg/Makefile
config.status: creating cli/Makefile
config.status: creating cli/debug
config.status: creating lib/Makefile
config.status: creating plugin/Makefile
config.status: creating po/Makefile.in
config.status: creating share/Makefile
config.status: creating share/bcih/Makefile
config.status: creating tests/Makefile
config.status: creating extra/Makefile
config.status: creating osx/Makefile
config.status: creating osx/gretl.sh
config.status: creating osx/fixlinks.sh
config.status: creating osx/Info.plist
config.status: creating redhat/gretl.spec
config.status: creating utils/emacs/Makefile
config.status: creating doc/Makefile
config.status: error: cannot find input file: `doc/commands/Makefile.in'
I hope this helps others if they're having the same issues as me!
--
Clive Nicholas
"My colleagues in the social sciences talk a great deal about methodology.
I prefer to call it style." -- Freeman J. Dyson
8 years, 11 months
strings and filenames
by Summers, Peter
Hi all,
I've come across some (to me) odd behavior regarding how sprint handles string substitution. I have several regressions that I'm running in a loop, and I want to save the associated model table in new file each time through. This seems like it should work (on Windows 7, current snapshot):
<hansl>
list xlist = (names of relevant variables)
vnames = varnames(xlist)
loop foreach i xlist
# run regressions, save to model table, etc.
foo = vnames[i] # string with dependent variable name
foo ~= ".tex"
sprintf fname "C:\Users\psummers\Documents\my directory\%s", foo
</hansl>
However the sprintf command generates a syntax error ("sprintf: unprocessed argument(s): 'foo'Syntax error"). If I replace the last backslash with something else (eg a comma), it works fine. At the moment that's my work-around (combined with using strsub to switch the comma back to "\", of course).
According to the user's guide, the "\" character isn't "special" within sprintf, but it seems to be causing some problems here.
TIA,
PS
[cid:logoimg]
8 years, 11 months
Easy Question -- Doing a Naive Forecast
by Data Analytics Corp.
Hi,
A naive forecast model can be represented as an ARIMA(0,1, 0) without a
constant term. When I try this in Gretl, I get an error message:
Command has insufficient arguments. How can I do a naive forecast with
the ARIMA? I need to show my students how this is done.
Thanks,
Walt
________________________
Walter R. Paczkowski, Ph.D.
Chief Data Scientist
Data Analytics Corp.
44 Hamilton Lane
Plainsboro, NJ 08536
________________________
(V) 609-936-8999
(F) 609-936-3733
walt(a)dataanalyticscorp.com
www.dataanalyticscorp.com
_____________________________________________________
8 years, 11 months