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

Feature Request: "--preserve" option
by Henrique Andrade

Dear Gretl Team,
We can use the option "--preserve" with the "open" command to preserve
matrices and scalars. I would like to ask you if it is possible to include
strings too (so the "preserve" option will preserve matrices, scalars, and
strings).
Best regards,
Henrique Andrade
7 years, 6 months

Re: [Gretl-users] Impulse responses in VECM
by Thomas Schneider

Thanks for your help, Artur! I appreciate this a lot.
> Some while ago their was already a thread on standadizing IRFs. Please have
> a look on this in the archive.
I saw this thread
(http://lists.wfu.edu/pipermail/gretl-users/2013-April/008808.html)
from early 2013 that addresses a similar question. The approach is
comparable to what I had in mind, but I am still confused why there is
a difference between the response of my shocked variable to a shock in
itself in period 1 (period 0 in the graphs) and the SE I calculate
manually as 1 SD / SQRT(no. of observations) from the summary
statistics.
The former is 0.0155, the latter is 0.4826 / SQRT(194) = 0.0347 (all
figures rounded for convenience). Any advice would be appreciated.
Thomas
7 years, 8 months

"If-Else" syntax help
by Henrique Andrade

Dear Gretl community,
I'm not a good "if-else" user so I need a little help. What's wrong with
the following code?
<hansl>
open australia.gdt
series E_hp = E - hpfilt(E, 1600)
if E > E_hp
series E_reg1 = E
series PAUreg1 = PAU
series PUSreg1 = PUS
else
series E_reg1 = NA
series PAUreg1 = NA
series PUSreg1 = NA
endif
<hansl>
When I execute it I get the messages: "error evaluating 'if'" "Error
executing script: halting".
Best regards,
Henrique Andrade
7 years, 8 months

ARDL lag lenght selection using all possible combinations
by Artur T.

Dear all,
I want to find the optimal lag length of an ARDL model allowing for
variable-specific lag lengths.
For instance, I've got K variables and want to select the optimal lag
structure by searching across the (pmax-1)^K ARDL models, spanned by
p=0,1,..., pmax and p_k=0,1,..., pmax, k=1,.., K using some criteria (e.g.
AIC).
I am looking for a clever trick to estimate all of these possible models
but only have a complicated "loop-in-loop-in-loop" structure in mind. Does
anybody have a clever idea how to realize this task efficiently?
Btw, it seems that the latest Eviews 9 version has this feature included:
http://www.eviews.com/EViews9/ev9ecest_n.html#ardl
Best,
Artur
7 years, 8 months

Impulse responses in VECM
by Thomas Schneider

I have two questions related to the impulse response functions of VEC
models.
(1) How many draws are conducted when bootstrapping the confidence
intervals and how can their value be modified?
(2) I want to calculate the percentage responses to a 1 percent change in a
specific shock variable (which comes first in the Cholesky ordering). Since
all variables enter the model in natural logs, I divided the default
impulse responses by one standard error (SE) of the logged shock variable
to achieve this. Looking at the summary statistics and calculating one SE
as <one standard deviation> / <square root of no. of observations> gives me
something different from the value of the logged shock variable in period
1, however. Since I presume this is the contemporaneous/instantaneous
impact (corresponding to period 0 in the graphs), I would expect both
values to be the same, since the variable should respond by exactly one SE
when itself is shocked by one SE. What am I doing wrong?
Thank you for your help.
Thomas
7 years, 8 months

a possible bug in coint2 via GUI
by oleg_komashko＠ukr.net

Dear all! To reproduce,
open denmark.gdt series un = randgen(u,0,1) coint2 2 LRM LRY IBO IDE ;null; un --seasonals --rc
works OK.
When I try do to this via GUI with LRM LRY IBO IDE in "Variables to test"; un R in "Exogenous variables" lag order 2; checked "Include seasonal dummies"; and "Restricted constant" I get "Syntax error"
Looks as if the GUI calls
coint2 2 LRM LRY IBO IDE ;; un --seasonals --rc
I use 1.10 on debian (outdated by a month or so)
7 years, 8 months

why the error?
by Qi Shi

dear everyone,
when i write in gretl the scripts
"open greene22_2discrete Z5list X=dummify(Z5) --drop-first"
then I run the program and get the results,
"gretl version 1.9.92Current session: 2015-03-14 16:31
? open greene22_2
Read datafile C:\Program Files\gretl\data\greene\greene22_2.gdtperiodicity: 1, maxobs: 601observations range: 1 to 601
Listing 10 variables: 0) const 1) Y 2) Z1 3) Z2 4) Z3 5) Z4 6) Z5 7) Z6 8) Z7 9) Z8
? discrete Z5? list X=dummify(Z5) --drop-first> list X=dummify(Z5) --drop-The symbol 'drop' is undefined
Error executing script: halting> list X=dummify(Z5) --drop-first"
why did i encounter the error?
best,
shi,qi
7 years, 8 months