Sign function in gretl
by Alecos Papadopoulos
I thought we had a sign function in gretl but I cannot find it
(returning 1 if positive -1 if negative, 0 if zero)
The need arose in estimating AR(1) procecess with a near-unit root.
Following Hamilton's advise in order to avoid crashing the iterative
algorithm, I reparametrize the autoregressive coefficient rho by
rho = lambda / (1 + abs(lambda)
Then
lambda = rho / (1- sgn{rho} *rho).
Certainly one can write
sign(rho) = (1- (rho==0) )* (1- 2*(rho <0)),
or something more efficient,
but the sign seems pretty fundamental to be an expression or a
user-defined function. Is it hidden somewhere? :)
--
Alecos Papadopoulos PhD
Athens University of Economics and Business
web: alecospapadopoulos.wordpress.com/
skype:alecos.papadopoulos
4 years, 7 months
No gnuplot after installing the latest gretl 2020c-git 2020-04-20 build
by Fred Engst
Hi Allin and the team,
After download and installed the latest 2020c-git 2020-04-20 build on my MacBook pro 2018, when I tried to do a plot, I got this message:
"Failed to execute child process "gnuplot" (No such file or directory)."
While reinstalling the 2020b with 2020-04-11 built, trying for a plot I get the same error message that others got too:
Gnuplot is broken or too old: must be >= version 5.0
I’m not sure how to fix this error.
So for now, I have to reinstall a much earlier version to do my work.
Fred
4 years, 7 months
Re: Gretl-users Digest, Vol 159, Issue 17
by Stefano Fachin
as a typical dummy user of Hansl (that is, somebody that can write
enough code to do whatever he needs to, but typically in an inefficient
way) I can confirm that Alecos got perfectly the point. Is that syntax
concise and efficient? yes. Is it 100% obscure to a dummy like me? yes.
So I simply never sit down to understand it and keep using IF's, I guess
because, right or wrong, I feel the gains (computing speed, elegance)
are not worth the loss of transparency of the code when I read it (to
check for bugs, to pick it up after some time, etc ).
bye,
Stefano
understood that syntax
Il 25/04/2020 00:00, gretl-users-request(a)gretlml.univpm.it ha scritto:
> Send Gretl-users mailing list submissions to
> gretl-users(a)gretlml.univpm.it
>
> To subscribe or unsubscribe via email, send a message with subject or
> body 'help' to
> gretl-users-request(a)gretlml.univpm.it
>
> You can reach the person managing the list at
> gretl-users-owner(a)gretlml.univpm.it
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Gretl-users digest..."
>
> Today's Topics:
>
> 1. Re: Sign function in gretl (Alecos Papadopoulos)
> 2. Re: SVEC restriction (Olasehinde Timmy)
>
>
> ----------------------------------------------------------------------
>
> Date: Fri, 24 Apr 2020 21:07:46 +0300
> From: Alecos Papadopoulos <papadopalex(a)aueb.gr>
> Subject: [Gretl-users] Re: Sign function in gretl
> To: gretl-users(a)gretlml.univpm.it
> Message-ID: <4042fbf7-d164-dd25-84be-9da5995bc712(a)aueb.gr>
> Content-Type: text/plain; charset=iso-8859-15; format=flowed
>
> I believe this is because the IF function in spreadsheets (and the IF
> command in gretl also) is very straightforwardly conceptually linked to
> the verbal description of how one would dictate the action
>
> "If this happens do that, else do that"
>
>
> Conditional assignment on the other hand uses a symbol that makes it
> looks like it translates a different verbal description:
>
>
> s = x==0 ? 0 : (x>0 ? 1 : -1)
>
>
> Here the "IF" notion is replaced by a question mark so we imply a
> question "is x equal to zero ?". Then we write directly 0... but in this
> way, we have skipped any visual clue that the "0" after the ? is the
> action IF the answer to the question is "yes".
>
> So people get frozen. "Ok I see "x==0 ?" and I understand "Is x equal to
> zero?", fine. Is it? Is it not?" ... It is the question mark that
> creates all the confusion I think, because it is one step prior to
> consider the answer (the "IF") on which the possible actions will
> depend. It appears to link a question to possible actions without
> providing the possible answers in between that determine which actions
> to execute.
>
>
>
> Alecos Papadopoulos PhD
> Athens University of Economics and Business
> web: alecospapadopoulos.wordpress.com/
> skype:alecos.papadopoulos
>
> On 24/4/2020 20:43, Riccardo (Jack) Lucchetti wrote:
>> I find it extremely difficult to come to terms with the fact that many
>> people consider conditional assignmment an obscure geeky thing, and
>> then happily use the IF() function in spreadsheets with no apparent
>> effort.
> ------------------------------
>
> Date: Fri, 24 Apr 2020 21:21:03 +0100
> From: Olasehinde Timmy <timmexdareal(a)gmail.com>
> Subject: [Gretl-users] Re: SVEC restriction
> To: Gretl list <gretl-users(a)gretlml.univpm.it>
> Message-ID:
> <CAGd3QrCbciN=5TWf7RT3nYOGgQJZ2pb9nK8AjMvAwWMx00rbsQ(a)mail.gmail.com>
> Content-Type: multipart/alternative;
> boundary="0000000000008a13a105a40f1b66"
>
> --0000000000008a13a105a40f1b66
> Content-Type: text/plain; charset="UTF-8"
>
> Thank you sir. I will revert back to you soon.
>
> Cheers
>
> On Fri, Apr 24, 2020, 9:28 AM Sven Schreiber <svetosch(a)gmx.net> wrote:
>
>> Am 23.04.20 um 22:44 schrieb Olasehinde Timmy:
>>> I want to estimate a five-variable SVECs model with;
>>> Y = Output
>>> T = Tax
>>> R = Interest rate
>>> G = Government expenditure
>>> P = Price
>>> I assumed three theoretical co-integrating vectors;
>>> Y = beta11*G + beta12*P (stabilization rule)
>>> T = beta21*G (solvency)
>>> R = beta31*P (fisher relation)
>>>
>>> I want to however assign the three transitory shocks to T, G, & R
>>> respectively; does this not violate the listing the transitory shocks
>>> last in the Gretl convention?
>> OK, it's very good that now we have a specific example to work with.
>> First, you're right that the variable ordering matters here, so you
>> would have to construct your variable list for example like this: Y P T G
>> R.
>>
>> However, since you want Y and P to appear in the same cointegration
>> relationship, the default normalization for the beta matrix in the VECM
>> then won't work here (because it puts an identity submatrix at the top).
>> So in this case you need to estimate your beta explicitly with your
>> cointegration restrictions imposed before you go to the SVEC.
>>
>> So: You have to use gretl's builtin VECM apparatus and specify your
>> (over-) identifying restrictions on beta. (After initial estimation go
>> to Tests/Linear restrictions, then you have to type in the restrictions
>> in the format explained in the gretl user guide.) To be on the safe side
>> you should explicitly "grab" the estimated beta matrix: In the main
>> window go to Add/Define matrix and type something like "mybeta = $jbeta".
>>
>> OK, so now you can enter the estimated cointegration matrix into the
>> SVEC_GUI window field "coint (j)beta". Either you simply type in gretl's
>> accessor name "$jbeta" (without the quotes) or if that doesn't work for
>> some reason you use your grabbed object "mybeta".
>>
>> Then you can proceed to specify the remaining structural shock
>> restrictions with the pattern matrices.
>>
>> HTH
>>
>> sven
>> _______________________________________________
>> Gretl-users mailing list -- gretl-users(a)gretlml.univpm.it
>> To unsubscribe send an email to gretl-users-leave(a)gretlml.univpm.it
>> Website:
>> https://gretlml.univpm.it/postorius/lists/gretl-users.gretlml.univpm.it/
>>
> --0000000000008a13a105a40f1b66
> Content-Type: text/html; charset="UTF-8"
> Content-Transfer-Encoding: quoted-printable
>
> <div dir=3D"auto">Thank you sir. I will revert back to you soon.=C2=A0<div =
> dir=3D"auto"><br></div><div dir=3D"auto">Cheers</div></div><br><div class=
> =3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Fri, Apr 24, 2020=
> , 9:28 AM Sven Schreiber <<a href=3D"mailto:svetosch@gmx.net">svetosch@g=
> mx.net</a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"m=
> argin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Am 23.04.20 u=
> m 22:44 schrieb Olasehinde Timmy:<br>
> > I want to estimate a five-variable SVECs model with;<br>
> > Y =3D Output<br>
> > T =3D Tax<br>
> > R =3D Interest rate<br>
> > G =3D Government expenditure<br>
> > P =3D Price<br>
> > I assumed three theoretical co-integrating vectors;<br>
> > Y =3D beta11*G=C2=A0+ beta12*P (stabilization rule)<br>
> > T =3D beta21*G (solvency)<br>
> > R =3D beta31*P (fisher relation)<br>
> ><br>
> > I want to however assign the three transitory shocks to T, G, & R<=
> br>
> > respectively; does this not violate the listing the transitory shocks<=
> br>
> > last in the Gretl convention?<br>
> <br>
> OK, it's very good that now we have a specific example to work with.<br=
> First, you're right that the variable ordering matters here, so you<br>
> would have to construct your variable list for example like this: Y P T G R=
> .<br>
> <br>
> However, since you want Y and P to appear in the same cointegration<br>
> relationship, the default normalization for the beta matrix in the VECM<br>
> then won't work here (because it puts an identity submatrix at the top)=
> .<br>
> So in this case you need to estimate your beta explicitly with your<br>
> cointegration restrictions imposed before you go to the SVEC.<br>
> <br>
> So: You have to use gretl's builtin VECM apparatus and specify your<br>
> (over-) identifying restrictions on beta. (After initial estimation go<br>
> to Tests/Linear restrictions, then you have to type in the restrictions<br>
> in the format explained in the gretl user guide.) To be on the safe side<br=
> you should explicitly "grab" the estimated beta matrix: In the ma=
> in<br>
> window go to Add/Define matrix and type something like "mybeta =3D $jb=
> eta".<br>
> <br>
> OK, so now you can enter the estimated cointegration matrix into the<br>
> SVEC_GUI window field "coint (j)beta". Either you simply type in =
> gretl's<br>
> accessor name "$jbeta" (without the quotes) or if that doesn'=
> t work for<br>
> some reason you use your grabbed object "mybeta".<br>
> <br>
> Then you can proceed to specify the remaining structural shock<br>
> restrictions with the pattern matrices.<br>
> <br>
> HTH<br>
> <br>
> sven<br>
> _______________________________________________<br>
> Gretl-users mailing list -- <a href=3D"mailto:gretl-users@gretlml.univpm.it=
> " target=3D"_blank" rel=3D"noreferrer">gretl-users(a)gretlml.univpm.it</a><br=
> To unsubscribe send an email to <a href=3D"mailto:gretl-users-leave@gretlml=
> .univpm.it" target=3D"_blank" rel=3D"noreferrer">gretl-users-leave(a)gretlml.=
> univpm.it</a><br>
> Website: <a href=3D"https://gretlml.univpm.it/postorius/lists/gretl-users.g=
> retlml.univpm.it/" rel=3D"noreferrer noreferrer" target=3D"_blank">https://=
> gretlml.univpm.it/postorius/lists/gretl-users.gretlml.univpm.it/</a><br>
> </blockquote></div>
>
> --0000000000008a13a105a40f1b66--
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> Gretl-users mailing list -- gretl-users(a)gretlml.univpm.it
> To unsubscribe send an email to gretl-users-leave(a)gretlml.univpm.it
> Website: https://gretlml.univpm.it/postorius/lists/gretl-users.gretlml.univpm.it/
>
>
> ------------------------------
>
> End of Gretl-users Digest, Vol 159, Issue 17
> ********************************************
--
_________________________________________________________________________
Stefano Fachin
Professore Ordinario di Statistica Economica
Dip. di Scienze Statistiche
Università di Roma "La Sapienza"
P.le A. Moro 5 - 00185 Roma - Italia
Tel. +39-06-49910834
fax +39-06-49910072
web http://stefanofachin.site.uniroma1.it/
--
________________________________________________________
Le informazioni
contenute in questo messaggio di posta elettronica sono strettamente
riservate e indirizzate esclusivamente al destinatario. Si prega di non
leggere, fare copia, inoltrare a terzi o conservare tale messaggio se non
si è il legittimo destinatario dello stesso. Qualora tale messaggio sia
stato ricevuto per errore, si prega di restituirlo al mittente e di
cancellarlo permanentemente dal proprio computer.
The information contained
in this e mail message is strictly confidential and intended for the use of
the addressee only. If you are not the intended recipient, please do not
read, copy, forward or store it on your computer. If you have received the
message in error, please forward it back to the sender and delete it
permanently from your computer system.
--
* Emergenza Coronavirus: facciamoci contagiare dalla solidarietà
aiutando i nostri ospedali universitari Le donazioni possono essere inviate
alla Fondazione Roma Sapienza che devolverà il ricavato al Policlinico
Umberto I e Ospedale Sant'Andrea.È possibile donare:- con bonifico bancario
(iban: IT72P 01030 03213 000063 259373, bic: PASCITM1R13, beneficiario
"Fondazione Roma Sapienza", causale "emergenza coronavirus") - con carta di
credito, attraverso il PayPal della Fondazione Sapienza
<https://www.fondazionesapienza.uniroma1.it/node/776>
4 years, 7 months
SVEC restriction
by Olasehinde Timmy
Dear Prof., Sven
I am very sorry to disturb you at this time. However, I need your guidance
on the additional long-run restriction in SVECs model.
I am finding it difficult to use the additional long-run restriction in the
SVEC interface. For instance, a four-variable VEC model with one
cointegrating vector requires additional 3 long-run restrictions with the 3
linear independent shocks to exactly identified the system. My questions
are;
1) Is it possible to use the total SVEC gui to do the restrictions ?
2) If not, how can I use the matrix interface in the SVEC gui to impose the
additional long-run restrictions.
3) Then, how can one place the long-run restrictions as it suite the
researcher.
Thanks.
4 years, 7 months
dbnomics error
by ΑΝΔΡΕΑΣ ΖΕΡΒΑΣ
Hi all,
The following code for dbnomics produces an error (Win 10, gretl 2020a,
dbnomics 0.37):
open dbnomics
data Eurostat/namq_10_gdp/Q.CLV10_MEUR.SCA.B1GQ.EL --name="y_sa"
Error executing script: halting
> data Eurostat/namq_10_gdp/Q.CLV10_MEUR.SCA.B1GQ.EL --name="y_sa"
The gui interface also fails to get the series.
However, using an earlier version of dbnomics (0.2 in my pc) gets the
series.
Series imported OK
Full data range: 1995:1 - 2019:4 (n = 100)
Listing 2 variables:
0) const 1) y_sa
Kind regards,
Andreas
4 years, 7 months
How to adjust heteroskedasticity
by robdans2@gmail.com
hello everybody, i would like to know whetere there is a way to eliminate single observations and outliers so that you can fix heteroskedasticity problems
Thanks!
4 years, 7 months
A question on Kalman Filter/MLE
by Alecos Papadopoulos
Because the Kalman Filter is an occasion where large numbers of matrices
get together to celebrate their existence, can somebody please clarify
the following for me:
Given starting values for the parameters, and all the rest, the Kalman
filter runs, and it gives the first log-likelihood value series. Then
the MLE takes over, but it immediately finds that
/"matrix is not positive definite"./
*The question is: which matrix is the message referring to?*
Output below:
<<
loglikelihood = -257.320305306
Parameters: -0.98707 0.75974 -2.5877 -0.46878
-0.27031 0.84507
-0.15738 -0.0069893 0.0031079 0.12495 0.68615
0.024908
0.021948 -0.26022 2.1582 -0.15156 3.8203
-0.0063071
0.13977 1.0020 -0.14038 3.3118
0.0056091 0.0085330
0.038741 0.0069463 0.00000 0.00000
-0.40048 -1.4917
49.000 49.000 49.000 49.000
1.0000 1.0000
0.015000 0.10000 -0.80000
Gradients: 0.00000 0.00000 0.00000 0.00000 0.00000
0.00000
0.00000 0.00000 0.00000 0.00000
0.00000 0.00000
0.00000 0.00000 0.00000 0.00000
0.00000 0.00000
0.00000 0.00000 0.00000 0.00000
0.00000 0.00000
0.00000 0.00000 0.00000 0.00000
0.00000 0.00000
0.00000 0.00000 0.00000 0.00000
0.00000 0.00000
0.00000 0.00000 0.00000 (norm 0.00e+000)
Tolerance = 1.81899e-012
Matrix is not positive definite
Error executing script: halting
>>
--
Alecos Papadopoulos PhD
Athens University of Economics and Business
web: alecospapadopoulos.wordpress.com/
skype:alecos.papadopoulos
4 years, 7 months
gretl crashed when reformatting the model table
by Fred Engst
Hi Allen and others,
Item 1:
Today I found a repeatable crash.
Gretl crashed either
1) when I open a session file and tried to add more models to the model table and then tried to open the table, or
2) After clearing the model table, putting a few model in it, then tried to reformat the table after it was opened.
Attached is the crash report.
Item 2:
I have encountered a strange behavior of gretl.
Once I create a gnupot, I can zoom to the area that I wanted to see.
However, once I save the graph as an icon, any further zooming attempt will result in an error:
"Failed to open file '/Users/fred/.gretl/gretltmp.png': No such file or directory”.
so I closed the graph, and then open it by clicking on the icon, once more I can zoom.
Is this to be expected?
Fred
4 years, 7 months
Gretl Import Error
by robdans2@gmail.com
Hello,
I'm currently working on the impact of Governance (ESG) on corporate investments. Gretl keeps on giving me an error when importing a file, specifically with the name of the companies (the tickers).
This is kinda weird, because when i import a very similar .xls file related to Social Data (with the same tickers) no error is given.
If you could help me with this issue, i would be very thankful!
4 years, 7 months