Defining a list of series before series are loaded, is it possible?
by Iago Varela
Hi all, I'm Yago again.
So I'm struggling with a new thing.
The script I'm writing asks the user to imput at the very top what variables will be used as dependent and regressors for a logit model. I wanted to put it at the top so any user imput is close and neat, and there's no skim through code necessary.
The problem is that I can't make a list before I have a dataset, I can't make a list for series that are not defined before such list.
I've been trying to transform bundes and arrays to lists, so I can define those at least in the beggining, and later on pass the values in to lists, but apparently that isn't possible either (or I'm doing something wrong, or lack knowledge, but I promise I spent quite a time in the documentation).
Series are unknown until the dataset is loaded, as the dataset will likely come with dummy variables and transformations from a previous exercise.
I'm hitting a limit here, or is there any way to perform this?
Thank you for your time!
3 years, 6 months
multiple instances in 2021a
by Stefano
Hi
I noticed that when opening a script with Gretl already running choosing
"do not open a new Gretl instance" does not have any effect (that is, a
further instance of Gretl is started even if you ask not to)
bye
Stefano
--
________________________________________________________________________
Stefano Fachin
Professore Ordinario di Statistica Economica
Dip. di Scienze Statistiche
"Sapienza" Università di Roma
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.
3 years, 6 months
Re: Deleting values in a dataset (data transformation)
by Artur Bala
Hi Yago,
What about restricting the sample and make the changes like this:
smpl RowNumber > 0 --restrict
Exited= NA
smpl full
Or another way (more compact)
Exited = (RowNumber > 0)? NA; Exited
Best,
Le lun. 22 mars 2021 à 13:51, Iago Varela <iagovar(a)outlook.com> a écrit :
>
> Hi, I'm Yago, new to gretl.
>
> My question is the following:
>
> I have a dataset with 11k observations.
>
> I have a bunch of "series", being '*RowNumber' *and *'Exited' *two of
> them.
>
> I basically want to set 'Exited' values to 'Null' (or the Gretl
> equivalent) where 'RowNumber' > 10000
>
> I've been trying with the Gretl documentation to figure out how to do
> this, but apart for being an absolute beginner at programing, it appears
> that foreach loops can't be used with series, or that's what the console
> says.
>
> I figured out that my 'pseudocode' would be something like:
>
> loop foreach RowNumber Exited
> if RowNumber > 10000
> Exited = Null
> endif
> endloop
>
>
> I've been trying for a couple days, also emulating Foreach loops from
> other languages, unsuccesfully, hope someone can explain this to me. It's
> probably something dumb I'm missing out.
>
> Thank you for your time!
> Yago
> _______________________________________________
> 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 years, 6 months
Deleting values in a dataset (data transformation)
by Iago Varela
Hi, I'm Yago, new to gretl.
My question is the following:
I have a dataset with 11k observations.
I have a bunch of "series", being 'RowNumber' and 'Exited' two of them.
I basically want to set 'Exited' values to 'Null' (or the Gretl equivalent) where 'RowNumber' > 10000
I've been trying with the Gretl documentation to figure out how to do this, but apart for being an absolute beginner at programing, it appears that foreach loops can't be used with series, or that's what the console says.
I figured out that my 'pseudocode' would be something like:
loop foreach RowNumber Exited
if RowNumber > 10000
Exited = Null
endif
endloop
I've been trying for a couple days, also emulating Foreach loops from other languages, unsuccesfully, hope someone can explain this to me. It's probably something dumb I'm missing out.
Thank you for your time!
Yago
3 years, 6 months
x mod y
by Paolo Chirico
Hi,
can you help me to do X mod Y in gretl? (to get the rest of x/y)
Thanks
Paolo
--
Paolo Chirico
Università del Piemonte Orientale
Dip. di Giurisprudenza e Scienze Politiche,
Economiche e Sociali (DIGSPES)
Alessandria, Italia
3 years, 6 months
Treatment of nan by the quantile function
by Alecos Papadopoulos
How does the quantile function treats/handles nan values in a series
(and/or matrix column if the treatment is different)?
I am asking motivated by the following. Consider
<hansl>
scalar bootquant95 = quantile(bootmom3Stat,0.95)
scalar bootquant90 = quantile(bootmom3Stat,0.90)
scalar bootquant85 = quantile(bootmom3Stat,0.85)
scalar bootquant80 = quantile(bootmom3Stat,0.80)
matrix bootRejmom3Stat[i,1] = (mom3Stat[i,1] > bootquant95)
matrix bootRejmom3Stat[i,2] = (mom3Stat[i,1] > bootquant90)
matrix bootRejmom3Stat[i,3] = (mom3Stat[i,1] > bootquant85)
matrix bootRejmom3Stat[i,4] = (mom3Stat[i,1] > bootquant80)
</hansl>
"bootmom3Stat" (whose quantiles I have to compute) is a column vector.
Some of its values are nan. The value "mom3Stat[i,1]" is always a number.
What happens sometimes is that as regards the four elements of the i-row
of matrix "bootRejmom3Stat", some values result as nan while others as
"0" or "1". For example I have one case where
(mom3Stat[i,1] > bootquant95) = nan
(mom3Stat[i,1] > bootquant90) = 0
(mom3Stat[i,1] > bootquant85) = nan
(mom3Stat[i,1] > bootquant80) = nan
In another example, I got
(mom3Stat[i,1] > bootquant95) = 1
(mom3Stat[i,1] > bootquant90) = 1
(mom3Stat[i,1] > bootquant85) = nan
(mom3Stat[i,1] > bootquant80) = 0
It appears strange to have a proper number value for the 0.8-quantile
and for the 0.9-quantile so that the inequality condition can be
checked, but not for the 0.85-quantile.
--
Alecos Papadopoulos PhD
Athens University of Economics and Business
web: alecospapadopoulos.wordpress.com/
scholar:https://g.co/kgs/BqH2YU
3 years, 6 months
Problem with deleting series inside a loop
by Alecos Papadopoulos
I need the series "lever" from the "leverage" command inside a loop
construct in order to perform some hand-made transformation of OLS
residuals.
It appears that I need to run the "leverage" command with the --save
flag (and the --quiet flag to avoid printing).
This will save in the data base all three series "lever", "influ" and
"dffits" produced by the leverage command.
But this is inside a loop. That will run several thousand of times. I
certainly do not want to save these three series thousand of times (as
is the consequence of the functionality of the leverage command on the
matter, quote, <<However, if series of these names already exist, the
names of the newly saved series will be adjusted to ensure uniqueness>>).
So I give the "delete" command with the --force flag to persuade gretl
to delete series inside the loop.
But I get the message
<<No variables were deleted (some data were in use)>>
I understand that this is likely a technical aspect that exceeds my
knowledge.
In practice the "lever" series is used to divide the OLS residuals. The
other series are not used for anything.
The delete command is given just before the "endloop" finale.
I know of the solution to NOT use the leverage command and still get my
diagonal elements of the hat matrix (in which case the same series will
be written over as the loop progresses), but the leverage command is the
efficient way to go. So I was wondering,
Any way that can I get gretl to delete the series inside the loop?
--
Alecos Papadopoulos PhD
Athens University of Economics and Business
web: alecospapadopoulos.wordpress.com/
scholar:https://g.co/kgs/BqH2YU
3 years, 6 months
series not suitable for disaggregation?
by Sven Schreiber
Hi,
when trying out the relatively new temporal disaggregation with the
quarterly AWM.gdt dataset in the GUI, I "always" get the error message
that the series does not appear to be suitable for that. For example
series CAN or GCN.
Is it because it is already quarterly and conversion to monthly isn't
supported? I confess I haven't read the entire chapter 9 of the guide on
the topic yet...
This is with a recent snapshot.
thanks for any hints
sven
3 years, 6 months
Entropy and/or Bayesian Econometrics w. GRETL
by taylan.bali@ankara.edu.tr
Dear GRETL Authors and Specialists
Is it possible to make Entropy and/or Bayesian Econometrics with GRETL,
such as Maximum Entropy or Minimum Cross Entropy Regressions? If so how?
Thank you very much beforehand and best regards.
Taylan Zafer Bali
3 years, 6 months