stopwatch problem
by Sven Schreiber
Hi,
I'm getting negative numbers from using $stopwatch differences, could
there be some sort of underflow problem?
What I do is a typical simulation exercise:
set stopwatch
t_sim1 = 0
loop for simrun=1..replications --quiet
<create random numbers>
loop for t=1..T --quiet
<do stuff with random numbers>
start = $stopwatch
<do more stuff>
stop = $stopwatch
<do more stuff>
t_sim1 += stop-start
end loop # t
end loop # simrun
print t_sim1
And t_sim1 is reproducibly negative.
However, in some other parts of the code, such cumulated running times
are not producing negative output, so it's more subtle. That's also the
reason why I'm not able to give you a minimal example so far, but I'll
keep trying.
Oh this is with a fairly new snapshot/cvs version, both on windows and
linux.
BTW and totally unrelated: Is it true that the user guide doesn't have a
section on plain VARs? (as opposed to the great VECM ch.)
thanks,
sven
15 years, 6 months
about matrix to series (or how to plot matrix columns)
by Sven Schreiber
Hi all,
I have suggestions about creating series from matrices in order to plot
the columns of a calculated matrix.
First of all, I think it would be useful if matrices columns (or rows)
could be directly used in plots without any conversion to series, though
I might be convinced otherwise if the conversion to series didn't
involve the problems that I describe below.
Second, a GUI-way of converting matrices to series would be nice, for
example in the session/symbol view right-click a matrix icon and have a
context menu entry "create series from columns" or some such. So far I'm
only aware of the script command, see guide chapter 12.9.
Then, here are some problems with the various workarounds that I tried:
1) first method: after calculating the relevant matrix do
'nulldata <appropriate sample size> --preserve'
and convert the matrix columns to series for plotting.
problems with that:
* the stuff in the old dataset isn't available anymore which is inconvenient
* I guess session handling with several workfiles is also problematic
quirks encountered along the way:
* why isn't the nulldata thing possible via GUI? "New dataset" is a
greyed-out menu item when another dataset is opened, but I see no real
reason for that.
* it seems impossible to load a matrix from file via GUI? (equivalent to
'mread', while GUI 'mwrite'-equivalent exists)
2) next method: convert the matrices to series (with script commands) in
the same workfile/dataset, after setting the sample size appropriately
problems here:
* after (each) plotting, the original sample has to be restored manually
-- it's easy to automate if that was the full dataset, but not for some
specifically chosen sample (right?)
quirks encountered:
* I find the paragraph in guide ch. 12.9 a little confusing (and after I
understand everything myself, I volunteer to rewrite it)
* I guess I understand the spirit of the restriction that the vector
length has to match the sample, but strictly speaking it's not
necessary; the dataset or sample dimension must be at *least* as big as
the number of matrix elements, but why exactly equal? Without the
stricter restriction, this workaround no. 2 would be easier, FWIW.
3) next method: same as in (2), but encapsulate that in a function which
does the conversion and plotting; the effect is that the sample of the
dataset isn't affected because it's outside the function scope
problem:
* after the function is done, the series are also gone (though it may
work to pass them back somehow using another dirty workaround, haven't
tried that)
Ok, I would classify some of the encountered quirks as feature requests
and some only as discussion items. The bottom line still is that I would
welcome direct plotting of matrix columns/rows in scatterplots or
against an index/time variable. Again, think of right-clicking a matrix
icon and choose a context menu entry for example.
sorry for a long post,
sven
15 years, 6 months
order of the variables plotted
by Talha Yalta
I have a feature request which would be nice to have if it is not too
difficult to implement:
It is possible to set the vertical axis for different variables but
not the order of the variables shown in the legend. I think, the order
of the variables plotted on a graph is currently determined by the ID#
of the variables.
As an example: Suppose one wants to plot money supply against a price
index. Bacause of the causality, it would make sense to have M1 as the
first variable and CPI as the second variable listed in the legend but
this may not be possible if CPI comes first in the varaibles list.
Best regards
Talha
--
“Remember not only to say the right thing in the right place, but far
more difficult still, to leave unsaid the wrong thing at the tempting
moment.” - Benjamin Franklin (1706-1790)
--
15 years, 6 months
Error in storing model
by Marcin Błażejowski
Hello,
problem accures when we want to replace named model existng in "session
icon view". Example:
<script>
open klein
M <- ols C const P I K
M <- ols C const X G T
</script>
The problem is with freeing memory, I suppose:
*** glibc detected *** gretl_x11: double free or corruption (!prev):
0x097e6600 ***
Marcin
15 years, 6 months
Sample restriction fails
by Alexander B. Gedranovich
Hello!
I've noticed, that when I open any data file and apply sample
restriction, based on criteria, gretl crashes. For example:
> open banks91
> smpl obs!=5 --restrict
Interesting, that this works:
> open banks91
> smpl 100 --random
> smpl obs!=5 --replace --restrict
Alexander Gedranovich
15 years, 6 months
database file size
by Sven Schreiber
Hi,
I was wondering why the file size of a gretl database is so big compared
to the other storage formats. For example, I have a relatively large
dataset which fills up 1.4MB when exported to csv. (Of course, gretls
native and zipped file is much smaller, about 170KB.) When I save this
data to gretl binary database format I get a 2MB file. And I thought
that text files like csv cannot be beaten in terms of explicitness and
bloat...
I'm asking because I'm playing around with many such files, so while one
file with 2MB is no problem, having many files with a total size in the
gigabyte range isn't really feasible.
thanks,
sven
15 years, 6 months
Building Mac OS X Disk Image
by Henrique
Dear developers,
I'm trying to build a Gretl dmg file on OS/X using the following
commands (like sugested by Allin in the build.pdf file,
http://ricardo.ecn.wfu.edu/~cottrell/gretl-osx/build.pdf):
cd /Users/henriqueandrade/gretl/Desenvolvimento/Imagem/misc/gd-2.0.35
PREFIX=/Users/henriqueandrade/gretl/Desenvolvimento/Imagem/misc
export CFLAGS="-O2 -I/sw/include"
export CPPFLAGS=$CFLAGS
export LDFLAGS="-L/usr/X11R6/lib"
./configure --prefix=$PREFIX --disable-rpath --disable-static --without-jpeg
make
make install
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/Users/henriqueandrade/gretl/Desenvolvimento/misc/lib/pkgconfig"
cd /Users/henriqueandrade/gretl/Desenvolvimento/Imagem/dist/gnuplot-4.3-cvs
TOPDIR=/Users/henriqueandrade/gretl/Desenvolvimento/Imagem/dist
export CFLAGS="-O2 -I/sw/include"
export LDFLAGS="-L/sw/lib -L/usr/X11R6/lib"
./configure --prefix=$TOPDIR/Gretl.app/Contents/Resources
make
make istall
TOPDIR=/Users/henriqueandrade/gretl/Desenvolvimento/Imagem/dist
export CFLAGS="-O2 -I/sw/include"
export LDFLAGS=-L/sw/lib
export CPPFLAGS=$CFLAGS
export PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/X11R6/lib/pkgconfig:/sw/lib/pkgconfig:/Users/henriqueandrade/gretl/Desenvolvimento/Imagem/misc/lib/pkgconfig"
export PATH=$TOPDIR/Gretl.app/Contents/Resources/bin:$PATH
./configure --prefix=$TOPDIR/Gretl.app/Contents/Resources
--disable-rpath --enable-build-doc --without-gnome
make
make install
cd /Users/henriqueandrade/gretl/Desenvolvimento/Imagem/dist
#!/bin/sh
# Clean out unwanted files and add a few extra things.
# Run this in the gretl build directory
# The directory above Gretl.app
TOPDIR=/Users/henriqueandrade/gretl/Desenvolvimento/Imagem/dist
PREFIX=$TOPDIR/Gretl.app/Contents/Resources
rm -f $PREFIX/bin/gretl
rm -rf $PREFIX/include
rm -rf $PREFIX/share/aclocal
rm -rf $PREFIX/share/info
rm -rf $PREFIX/info
rm -rf $PREFIX/lib/pkgconfig
rm -f $PREFIX/lib/*.la
rm -f $PREFIX/lib/gretl-gtk2/*.la
rm -rf $PREFIX/share/emacs
rm -rf $PREFIX/share/texmf-local
install -m 644 osx/README.pdf $TOPDIR
install -m 755 osx/gretl.sh $PREFIX/bin/gretl
install -m 755 osx/script $PREFIX
# uncomment for a PPC build:
# install -m 755 osx/Gretl.ppc $TOPDIR/Gretl.app/Contents/MacOS/Gretl
This is exactly the same as described by Allin's instructions. The
only differences are the folder places:
Users/henriqueandrade/gretl/Desenvolvimento/Imagem/misc instead of
Users/allin/misc
Users/henriqueandrade/gretl/Desenvolvimento/Imagem/dist instead of
Users/allin/dist
After all these commands I still can't build the image. What's wrong?
Where should I put the CVS files?
Best,
Henrique C. de Andrade
Doutorando em Economia Aplicada
Universidade Federal do Rio Grande do Sul
www.ufrgs.br/ppge
15 years, 6 months
cvs build error
by Sven Schreiber
Hi,
I just tried to compile a fresh cvs checkout and got the following error:
gcc -c -I.. -I../lib/src -I/usr/include/libxml2 mklang.c
../libtool --mode=link gcc -o mklang mklang.o ../lib/libgretl-1.0.la
-lxml2
libtool: link: gcc -o .libs/mklang mklang.o
../lib/.libs/libgretl-1.0.so -L/usr/lib -L/usr/local/lib -llapack -lblas
-lgfortran -ldl -lz /usr/lib/libglib-2.0.so /usr/lib/libgmp.so
/usr/lib/libfftw3.so -lm /usr/lib/libxml2.so
./mklang --lang2 > gretl.lang.2
/bin/sh: cannot create gretl.lang.2: Permission denied
I hope this is unrelated to the updated de.po that I committed just
before starting to compile...
any hints?
thanks,
sven
15 years, 6 months
Language preference menu
by Henrique
Developers,
I would like to know what do you think about change the "Language
preference menu" (TOOLS -> PREFERENCES -> GENERAL) to a drop-down
list. I think this feature could facilitate the use of the gretl's
language capabilities (one of the best features of the software) In
addition, all the gretl users (and not only the developers) going to
know the the powerful language capability.
Best,
Henrique C. de Andrade
Doutorando em Economia Aplicada
Universidade Federal do Rio Grande do Sul
www.ufrgs.br/ppge
15 years, 6 months