query
by susruth mulukalapally
dear sir ,
how to go for granger causality test in gretl ?
6 years, 11 months
functions optional arguments - numerical (NA equiv. to null), python like syntax (wish)
by Schaff, Frederik
Hi there, I pose this question & suggestion here instead the users list, I hope that is fine in this context.
It is currently not possible to use "null" as a default argument for scalar variables in function headers. It is, however, possible to use "NA". My question: Is there a save procedure to use "!isnan(variable)" similar to "exists(matrix)" for function headers? Currently, this seems not possible (or I am making a mistake). E.g.:
<hansl>
scalar testNA = NA
scalar testNotNA = $pi
?testNA
?testNotNA
if isnan(testNA)
printf "NA, isnan(testNA) evals to %f",isnan(testNA)
else
printf "not NA, isnan(testNA) evals to %f",isnan(testNA)
endif
if isnan(testNotNA)
printf "NA, isnan(testNotNA) evals to %f",isnan(testNotNA)
else
printf "not NA, isnan(testNotNA) evals to %f",isnan(testNotNA)
endif
<\hansl>
This script produces wrong output. It (always) produces "0.000000?", adding this "?" to the number and thus the statement always evaluates to "false" (and !isnan(), too).
This goes in direction of svens suggestion: "idea for the exists()/nelem() situation with lists" (following my confusion).
And then one other thing. In Python one can conveniently pass optional arguments via "argument_label=argument_value", without having to care about the sorting/completeness of the argument list. If such a thing was possible in hansl, that would be very convenient!
Best
Frederik
6 years, 11 months
error msg nulldata in functions
by Sven Schreiber
Hi,
not sure this is the appropriate error message:
<hansl>
function void checknull(void)
nulldata 10
end function
checknull()
</hansl>
thanks,
sven
6 years, 11 months
idea for the exists()/nelem() situation with lists in functions
by Sven Schreiber
Hi,
we repeatedly tried to tackle the problem that a gretl list as a
function argument with a null default value is special;
exists(mylistarg) will return 1 even when mylistarg was left at the
default 'null', for historical reasons.
Just now we again had a case on the users list that this situation
causes confusion.
What about this possible solution:
Let's introduce a special variant of exists() using a new optional
string arg "listarg" as follows: The call
exists(mylistarg, "listarg")
would be internally rerouted and equivalent to the expression
'nelem(mylistarg) > 0'. Example:
<hansl>
function void listex( list L[null])
eval exists(L)
eval nelem(L)
eval exists(L, "listarg")
end function
listex()
# would print out:
# 1 -- for exists(L)
# 0 -- for nelem(L)
# 0 -- for the new exists(L, "listarg")
list LL = foo bar
listex(LL)
# would print out:
# 1
# 2
# 1
# And usage without a function arg:
exists(LL, "listarg") # not inside a function, might yield an error
# ... but treating this just as exists(LL) is also a possibility
</hansl>
Thoughts?
thanks,
sven
6 years, 11 months
Re: [Gretl-devel] errors compiling gretl
by Ignacio Diaz-Emparanza
Yes, the problem is solved. Thanks a lot!
Message: 6
Date: Tue, 26 Dec 2017 19:47:41 -0500 (EST)
From: Allin Cottrell<cottrell(a)wfu.edu>
To: "Riccardo (Jack) Lucchetti"<r.lucchetti(a)univpm.it>
Cc: Gretl development<gretl-devel(a)lists.wfu.edu>
Subject: Re: [Gretl-devel] errors compiling gretl
Message-ID:
<alpine.LFD.2.20.3.1712261947010.22847(a)myrtle.attlocal.net>
Content-Type: text/plain; charset=US-ASCII; format=flowed
On Wed, 27 Dec 2017, Riccardo (Jack) Lucchetti wrote:
> On Tue, 26 Dec 2017, Allin Cottrell wrote:
>
>> On Wed, 27 Dec 2017, Riccardo (Jack) Lucchetti wrote:
>>
>>> On Tue, 26 Dec 2017, Allin Cottrell wrote:
>>>
>>>> On Tue, 26 Dec 2017, Ignacio Diaz-Emparanza wrote:
>>>>
>>>>> Hi, I am obtaining this errors in trying to build gretl
>>>>>
>>>>> "Makefile:96: fallo en las instrucciones para el objetivo 'gretlcli'
>>>>> make[1]: se sale del directorio '/home/ignacio/gretlcomp/gretl/cli'
>>>>> Makefile:64: fallo en las instrucciones para el objetivo 'cli'
>>>>> ../lib/.libs/libgretl-1.0.so: undefined reference to `shm_unlink'
>>>>> ../lib/.libs/libgretl-1.0.so: undefined reference to `shm_open'
>>>>> collect2: error: ld returned 1 exit status"
>>>>>
>>>>> Do you know why?
>>>> Ah, looks like we need to add "-lrt" to the linker line for some systems.
>>>> Is this on Ubuntu, Ignacio?
>>> Happening on Debian too.
>> OK, I've modified configure.ac accordingly. Please see if this is now
>> working OK.
> It does on Debian stretch.
Wow, that was quick! Glad to hear it.
Allin
--
UPV/EHU Firma de email
Ignacio Díaz-Emparanza Herrero
Akademia Antolakuntza eta Graduondoko dekanorde
Vicedecano de Ordenación Académica y Postgrado
ignacio.diaz-emparanza(a)ehu.eus <mailto:ignacio.diaz-emparanza@ehu.eus>
T. +34 946 013 602
Logo UPV/EHU
Ekonomia Aplikatua III Saila (Ekonometria eta Estatistika)Departamento
de Economía Aplicada III (Econometría y Estadística)
Bizkaiko Campusa Campus de Bizkaia
Avenida lehendakari Aguirre, 83, 48015 Bilbao
T. +34 946 013 740 F. +34 946 013 754
www.ehu.eus <http://www.ehu.eus>
<https://www.facebook.com/UPVEHU-106770286010768>
<https://twitter.com/upvehu> <https://www.linkedin.com/school/15248508>
<https://plus.google.com/u/0/+universidadpaisvasco/>
<http://www.pinterest.com/> <https://www.instagram.com/>
<https://www.youtube.com/user/upvehu> <https://vimeo.com/upvehu>
Erne! Baliteke mezu honen zatiren bat edo mezu osoa legez babestuta
egotea. Mezuak badu bere hartzailea. Okerreko helbidera heldu bada
(helbidea gaizki idatzi, transmisioak huts egin) eman abisu igorleari,
korreo honi erantzunda. Kontuz! Mezua ez bada zuretzat, ez erabili, ez
zabaldu beste inori, ez kopiatu eta ez baliatu. *E-mail hau imprimatu
baino lehen egiaztatu imprimatzeko beharra*.
¡Atención! Este mensaje contiene información privilegiada o confidencial
a la que sólo tiene derecho a acceder la persona destinataria. Si usted
lo recibe por error le agradeceríamos que no hiciera uso de la
información y que se pusiese en contacto con la o el remitente.*Antes de
imprimir este e-mail piense bien si es necesario hacerlo. *
6 years, 11 months
searching the documentation
by Sven Schreiber
Hi,
good morning and happy New Year to everybody!
I think it would be nice to improve the documentation usage and have a
kind of instant and unified help search interface with matches being
displayed dynamically.
What I mean is something like a help window where you start typing in a
text field, and for example when you have entered "log" you would see
already see a list of matches like:
"logistic (command)", "logit (command)", "logs (command)", "log
(function)", ..., "logistic (function)", "logit_burr (contrib function
pkg)", "LOGIT_HETERO (contrib function pkg)".
Perhaps including paragraph or section headings of the user guide might
also be useful (optional?).
That would seem quite helpful to me.
cheers,
sven
6 years, 11 months