catch within a loop - not working?
by Pindar
Hi there,
I need to find out within a loop whether a matrix is empty or not, e.g.:
<hansl>
nulldata 100
matrix test={}
loop i=1..20 -q
catch inv(test)
if $error
print "WRONG"
endif
endloop
<hansl>
Which is not working.
Without the loop "WRONG" is printed as in
<hansl>
nulldata 100
matrix test={}
catch inv(test)
if $error
print "WRONG"
endif
<hansl>
Please help me with this problem.
Cheers
Leon
12 years, 4 months
No lags possible
by Emiel Denuwelaere
Hello,
I am trying to regress some time series variables in Gretl. The data i'm
using covers 16 time intervals on 6 explanatory variables for one country.
When checking for autocorrelation i found the following critical values:
dL=0,615 and dU=2,157 (http://www.stanford.edu/~clint/bench/dw05a.htm). The
DW statistic from the OLS estimation was 2,477 so i found the Durbin-Watson
test to be inconclusive. I would be very thankful if anyone could help me
with the following two questions:
1) Do i need to use normal OLS or build a dynamic model?
2) I tried to build a dynamic model with lags, but i could only add 1 lag
from each variable. Gretl doesn't allow me to add more lags.. Is this due
to the short data sample?
Many thanks in advance
Emiel Denuwelaere
12 years, 4 months
catch with data --odbc
by Pindar
Hi there,
while working with the data --odbc command in a loop I tried to get the
information whether reading out the whole data for a step is useful
by evaluating a very general sql statement. If there aren't any values
at all the complete query should be skipped later in the script.
However, the catch command does not set $error equal to 1 if the warning
is printed that there were no values to read.
I was using the ZIP variant for Windows XP.
Have a nice weekend
Leon
12 years, 4 months
How to run a gnuplot script from within a gretl script
by Paulo Grahl
Hello,
I am trying to run a gnuplot script from within a gretl script. Where can I
find some help / tutorials?
Basically, I am trying to do the following:
1. run a gretl script that opens a data file (which is updated every month).
2. do some calculations and stats withing gretl script
3. create a gnuplot with a "professional look"
3.a - ideally I would have a standard gnuplot script (with some
fancy formatting, with recession bars, etc) and then I would pass the
variables to be plotted (and some strings that would be the names of those
variables, title of the chart, etc) as parameters for the gnuplot script.
The idea is to have a gnuplot script that would work as a "template" and
then I would use this template to generate some charts with different time
series.
Any help?
Thanks
Paulo Gustavo Grahl, CFA
------------------------------------------
pgrahl(a)gmail.com
pgrahl(a)fgvmail.br
www.linkedin.com/in/pgrahl
------------------------------------------
12 years, 4 months
new command, "join"
by Allin Cottrell
Last month in Ancona, Jack Lucchetti, Claudia Pigini and I spent an
intensive week cooking up a new command for gretl. It's called
"join", its job is to pull together data from two or more sources
with the help of keys and/or filters, and -- casting modesty aside
-- we think it's a killer! Stata has a deservedly good reputation
for this sort of thing but we think that in some respects "join" may
put gretl ahead.
It's in CVS and snapshots and we invite you to try it out and give
us your comments. Full documentation with examples of use is
available at:
http://ricardo.ecn.wfu.edu/~cottrell/tmp/join.pdf (US letter)
http://ricardo.ecn.wfu.edu/~cottrell/tmp/join-a4.pdf (A4)
There's also a follow-up on the way, namely an account of how "join"
can be used to handle "real-time" data (time series data indexed not
only by the data to which the data refer, but also by the date on
which they were produced/revised). Expect something on this in the
next few weeks.
Allin
12 years, 4 months
How to plot lines with points in a script
by Paulo Grahl
Hello,
I am trying to plot a chart with a line/point type using a script.
I've tried the following:
gnuplot DI --with-lines --time-series --output="display" \
{ set title "Diffusion Index for OECD exports"; \
set ylabel "Diffusion Index (50 = no change)" ; \
set grid ytics; \
set style line 1 pt 70; }
But it did not work.
Any help?
PS: what is the standard code for this mailing list regarding "thanks"?
I've received some very helpful comments and suggestions / solutions for
may questions in the past but never replied "thanks" since I was afraid of
crowding the mail box of most users (and particularly those not involved or
not interested in the matters being discussed) .
--
Paulo Gustavo Grahl, CFA
------------------------------------------
pgrahl(a)gmail.com
pgrahl(a)fgvmail.br
www.linkedin.com/in/pgrahl
------------------------------------------
12 years, 4 months
Orthogonal IRF (OIRF)
by artur tarassow
Dear gretl list,
I programmed the OIRF in gretl using a code provided by MATLAB. For some
reason I obtain slightly different results compared to gretl's built-in
function, and I am not sure whether this is just due to rounding-errors or
a small error in the code. Please find attached a sample script.
Thanks in advance,
Artur
12 years, 4 months