Count consecutive observations
by F.R.Costa

I guys,hope you're all well,
I have a very quick question. I am working with stock market data. Let's say I have price observations for stock X. I want to exclude stock X from my data if it doesn't have at least 24 consecutive observations. Is there any simple command able to retrieve a consecutive count of observations. $nobs would give a total count, but is there a way to take account of this?
Thanks in advance
F.R.Costa
--
Securely sent with Tutanota. Get your own encrypted, ad-free mailbox:
https://tutanota.com
3 months

Re: Fwd: FIML estimation in single equation regression
by José Perles

Thanks Sven for your fast response.
In fact I have a sample with lots of missing data. From 207 observations I get with OLS command an effective sample size of 76.
I have seen that FIML would be a solution and some perform the analysis for example in Stata using “sem” command (method=mlmv).
I would know of it is possible to replicate the Stata result in Gretl.
Thanks again
José
Enviado desde mi iPhone
> El 30 abr 2020, a las 17:53, Sven Schreiber <svetosch(a)gmx.net> escribió:
>
> Am 30.04.2020 um 16:53 schrieb JOSE FRANCISCO PERLES RIBES:
>> Dear team:
>> There is an implementation of FIML estimation in the context of single
>> equation regression in Gretl?.
>> I have seen that Stata and other R functions performs this kind of
>> analysis using SEM capabilities as a workaround to deal with missing
>> data. Also I have found that there is an implementation in Gretl for the
>> case of Systems of Equations....
>
> Hello José, since OLS is also ML for a linear single equation I guess
> this is not what you mean. You mention missing data, is that what you're
> dealing with? It would be useful if you could describe in more detail
> what problem you're trying to solve.
>
> cheers
> 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/
3 months, 1 week

Clarification on Gauss-Legendre quadrature
by Alecos Papadopoulos

Maybe this is really a clarification on the theory, not on what gretl
does, but I will start by asking here.
Gretl gives weights and nodes for Gauss-Legendre quadrature for
arbitrary finite lower and upper limits of integration, not only the
default (-1,1).
Suppose I have a definite integral \int f(x) dx, with limits (a,b). I
ask Gretl for help through the quadtabe command, say for five nodes
matrix GLegm = quadtable (5,2, a,b) .
gretl obliges, and I get my nodes and my weights. Should I then also
make the transformation y = 2*(x-a)/(b-a) - 1, and evaluate the
integrand by [(b-a)/2]*SUM {w_i* f[a+(y_i+1)*(b-a)/2]},
where w_i are the weights I got and y_i the nodes I got,
or should I evaluate the integrand by SUM {w_i f(x_i)}, where here the
nodes I got interval are represented by x_i?
I ended up laughing with how confused this one has got me. The confusion
stems from the question "since I adjust the nodes and weights to the
actual interval (a,b), why should I also adjust the integrand?" But I
remember reading a tutorial on the matter, and it appeared to suggest
that we should do both: get weights and nodes for the (a,b) interval
/and /apply the transformation.
Any suggestions?
--
Alecos Papadopoulos PhD
Athens University of Economics and Business
web: alecospapadopoulos.wordpress.com/
skype:alecos.papadopoulos
3 months, 1 week

Fwd: FIML estimation in single equation regression
by JOSE FRANCISCO PERLES RIBES

Dear team:
There is an implementation of FIML estimation in the context of single
equation regression in Gretl?.
I have seen that Stata and other R functions performs this kind of analysis
using SEM capabilities as a workaround to deal with missing data. Also I
have found that there is an implementation in Gretl for the case of Systems
of Equations....
Thanks in advance and sorry for any inconvenience.
José Perles
University of Alicante
3 months, 1 week

Found it by luck (the odd typo).
by Ioannis A. Venetis

Hi all,
I copy - paste (copy-pasted or copied-pasted ? :))
Listing 9.1: Periodogram via the Fourier transform for the
gretl-guide.pdf
At least in my computer the transpose symbol is not the expected one by
gretl so it returns the following error.
<script output>
Unexpected byte 0xe2
C:\Program Files\gretl\write.chk: Permission denied
Couldn't write to 'C:\Program Files\gretl\': gretl will not work
properly!
C:\Users\Venetis\AppData\Roaming\gretl\gretl.pid: No such file or
directory
C:\Users\Venetis\AppData\Roaming\gretl\gretl.pid: No such file or
directory
Error executing script: halting
> omega = seq(1,($nobs/2))' .* (2*$pi/$nobs)
</ script output>
I know it seems the same but apparently it is not.
omega = seq(1,($nobs/2))' .* (2*$pi/$nobs)
Best,
Yiannis
3 months, 1 week

print .... -o is not listed in gretl:command reference or elsewhere
by Ioannis A. Venetis

Hi all,
I saw Jack's last hansl code, in particular, line
print x streak -o
Apparently it does what
print x streak --byobs
would do. But the option -o is not listed either in gretl:command
reference or gretl-ref.pdf.
It appears however in a number of places in the gretl-guide.pdf (in
listings, e.g Listing 14.1: Usage of interaction lists, page 117)
Best,
Yiannis
3 months, 1 week

On manageable matrix dimenisons
by Alecos Papadopoulos

I have a question for more experienced users and the guardians of gretl.
I am about to go into Markov Chain Monte Carlo simulations and an
acceptance/rejection algorithm of the generated values. This would
require something like 200,000 loop runs, from which say something like
100,000 will be accepted and should be stored. The number of parameters
is 32.
Up to now with smaller simulations, I used to store such values in
matrix objects, and then turn them into series objects. But now I am
looking at a 100,000 X 32 matrix, or at best at 32 vectors of 100,000 X
1 dimension, and I was wondering whether such a large row dimension will
create problems of speed or any other kind of problems.
Any suggestion on that?
--
Alecos Papadopoulos PhD
Athens University of Economics and Business
web: alecospapadopoulos.wordpress.com/
skype:alecos.papadopoulos
3 months, 2 weeks

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
3 months, 2 weeks

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
3 months, 2 weeks

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>
3 months, 2 weeks