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

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/
5 months, 4 weeks

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
6 months

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
6 months

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
6 months

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
6 months

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
6 months

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
6 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
6 months