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?
4 years, 11 months

bivariate probit in a loop
by Artur Bala

Dear all,
I'm currently estimating a bootstraped bivariate probit through a
progressive loop and retrieve each time the $yhat matrix. At some point,
the execution is interrupted with the "warning":
The statistic you requested is not available
>> genr series predict_external = $yhat[,1]
Is there a perfect prediction symptom behind this message isn't it?
Can one, in such a loop, skip cases where the MLE estimation is not
technically possible?
Best,
Artur
6 years, 3 months

problems with daily data
by Sven Schreiber

Hi,
I have a csv file with daily data, where each calendar day is a row, but
it's actually 5-days-a-week data, i.e. weekend days do not contain data.
First I have a problem with the import, gretl only imports it as undated
because it says about the date labels:
"
erster Zeilenkopf "99-01-04", letzter Kopf "2014-05-19"
Behandlung als undatierte Daten
"
(=treating it as undated), but the reason given is not true, because the
first date string is actually:
"1999-01-04"
so there seems to be some problem with the date parsing.
Ok, I can work around that, defining it manually as 7-days-daily data
with the right starting date. Then I have the interface issue that at
the bottom it only says "daily" (in German), but I think it is important
here to show the distinction between 5- or 6- or 7-days-daily.
Next I would like to convert the workfile from 7-days-daily to
5-days-daily, i.e. remove the empty (=missings) weekends obs, but this
doesn't seem to be easy to do. (Note that removing all missing obs is
not equivalent, because that also eliminates other holidays, which is
another topic. Also I know I could use 'join' together with the source
csv file to do that, but I think it should be easier than that, no?)
When I try to work around that by removing all missing obs (including
the holidays) within the 7-days-daily workfile, I run into the old
problem that gretl then starts treating it as undated and the date
information is lost. Note that I cannot then manually set it to
5-days-daily because of the missing holidays which gretl doesn't know
about, i.e. the imposed dating produces errors, and this accumulates
over time.
The first thing mentioned is a bug, but any ideas about the other stuff?
Thanks,
sven
6 years, 8 months

Variable generation full vs. restricted sample
by Sven Schreiber

Hi,
obviously it's absolutely essential to be able to create variables only
for the currently active subsample. But I'm wondering, is there another
(easier) way to generate variables also for the full workfile sample
range without temporarily removing and then later re-applying the sample
restrictions?
Perhaps something like "series mynew = log(income) --full" if you
understand what I mean by that.
thanks for suggestions,
sven
6 years, 9 months

Re: [Gretl-users] problems with gnuplot
by Artur T.

Hi Allin,
I changed the plotting-options as you can find it below, but still the
lines are not drawn based on the selected colors. Even after omitting the
options "set ylabel '' ; set xlabel 'Horizon' ; set key outside below
center horizontal" nothing changes, and the default colorset still applies
using one-week-old cvs on Windows 8.
<hansl>
set echo off
set messages off
open denmark.gdt --quiet
gnuplot LRM LRY --with-lines --time-series \
--output="C:\Users\artur.tarassow\Desktop\TEST.pdf" \
{ set terminal pdfcairo font 'Helvetica,15' lw 3 ; \
set style line 1 lc rgb 'black' ; \
set style line 2 lc rgb 'green' ; \
set style line 3 lc rgb 'red' ; \
set style line 4 lc rgb 'blue' ; \
set style line 5 lc rgb 'orange' ; \
set style line 6 lc rgb 'black' ; \
set ylabel '' ; set xlabel 'Horizon' ; \
set key outside below center horizontal ; }
</hansl>
Artur
6 years, 9 months

accessors for dpanel
by Sven Schreiber

Hi,
is there a way to store some of the diagnostic output from the 'dpanel'
command? For example, the '$sargan' accessor doesn't work with 'dpanel'.
Other useful retrievals could be the autocorrelation test results.
And with respect to the system variant of dpanel: Perhaps it would be
useful to automatically test the additional moment conditions, by
comparing the differences-only and the system specification?
thanks,
sven
6 years, 9 months

Question about SVAR
by Logan Kelly

Hello,
I am estimating a "plain" model with the SVAR package because the native irf() function returns :
Matrix is not positive definite
(Note: the reason for this error is discussed in another post)
Thus, I am trying the SVAR package, but the "actual" irf estimate is always above the bootstraped confidence bands. I am using the bias corrected bootstrapping method (Killian 1989).
I am thinking this must be a problem with my data, not SVAR or gretl? Does that sound right?
SVAR: 0.997
gretl: 1.9.90
os: win 7 64 bit
Thanks,
Logan
6 years, 9 months

problems with gnuplot
by Artur T.

Hi all,
I am currently using gretl cvs 1.9.91 on Windows 8. I set up the following
example to illustrate that gnuplot does not recognize my color choice, as
the two time-series still use the default color scheme butnot mine. The
gnuplot version is 5.0 rc1.
<hansl>
set echo off
set messages off
open denmark.gdt --quiet
# Print TSs:
gnuplot LRM LRY --with-lines --time-series \
--output="C:\Users\artur.tarassow\Desktop\TEST.pdf" \
{ set terminal pdfcairo font 'Helvetica,15' lw 3 ; \
set style line 1 lt 1 lc rgb 'black' ; \
set style line 2 lt 2 lc rgb 'green' ; \
set style line 3 lt 2 lc rgb 'red' ; \
set style line 4 lt 2 lc rgb 'green' ; \
set style line 5 lt 2 lc rgb 'orange' ; \
set style line 6 lt 6 lc rgb 'black' ; \
set ylabel '' ; set xlabel 'Horizon' ; \
set key bottom below ; }
</hansl>
Artur
6 years, 10 months

Gretl versus Eviews when testing after ARIMA or AR models
by JOSE FRANCISCO PERLES RIBES

Dear list:
First of all, sorry if the question is basic.
I'm exploring the issue of modelling non-linear time series. I have read in
several articles that a correct strategy is often to start by fitting a
linear model (for example a simple Autoregressive model) and if it is not
satisfactory, then try to fit a TAR, SETAR or Markov Switching Model,.... I
think this is a classical approach.
In the papers that I have read, in order to detect deviation from linearity
most authors apply several test over the residuals of the simple first
estimated AR model (for example RESET test, BDS test, Mc. Leod test are
common in this context). Then after reject the Null in these test, they
proceed with the non-linear model.
Playing with some series in Gretl, I have seen that after estimating an
AR(1) model or ARIMA model with the options built in Gretl-GUI, the window
"test" post-estimation option only allows to test for Normality or ARCH,
but other options as RESET or Non-linearity are not activated.
Only after estimating a model via OLS menu with the dependent variable and
its lags -that is not exactly the same of estimating the AR(1) model, so
the constant change as usual- these post-estimation options are allowed.
I have checked that in Eviews, for example, the options RESET, etc. are
(like not in Gretl) allowed after estimating both, the AR(1) model and the
equation with the lagged dependent variable.
Y C AR(1) AR residual term model
Y C Y(-1) model with the lagged endogenous variable
So, my question is: Why this difference among Gretl and Eviews, the
disallowed options in Gretl are for some special considerations?
If I want to perform this kind of analysis in Gretl, with an AR model,
which is the correct form to proceed?. Save the residuals of my estimated
AR model and export them to R or other software to perform the BDS or RESET
test as usual in literature?
Thanks in advance.
José Perles
University of Alicante
Spain
6 years, 10 months