Help with logistic regression report
by Davide Bertani
Hello everyone!
i'm a medical student from Italy, so not an expert in statistics and I
apologize in advance for my linguistic or technical errors.
I would like to ask if there is a way, using Gretl, to perform a series of
unique logistic regressions with a single command, keeping the same nominal
variable and analyzing its relationship with a series of measurement
variables extracted from an excel database. let me explain: I have a single
nominal variable , A, and a series of measurement variables B C D (100
items). usually I will open Gretl, load the database, click on "logit",
"binary", select the nominal variable and the first regressor, get the data
I need (O.R., p value, IC 95%), copy them, and paste them into Word or
Excel. then I repeat all again using the second regressor, then the third,
and so on...a huge waste of time and energies. Is there a way to avoid this
exhausting task, automating the process and performing the calculation
operation once, and then getting a table with the results in the column? Do
you think it's possible? could you help me with this task? thank you in
advance
Sincerely
Davide
7 years, 3 months
AWM18
by Riccardo (Jack) Lucchetti
Folks,
the EABCN guys have just made this year's version of the AWM database
available. I packaged it for gretl and you can find it at
http://www2.econ.univpm.it/servizi/hpp/lucchetti/gretl/AWM18.gdt
I guess we could include this in the next release in place of AWM17,
couldn't we, Allin?
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------
7 years, 3 months
Panel Cointegration
by Olasehinde Timmy
Dear professors,
Please, I need you to enlighten me on the panel Cointegration using Panel
ARDL. My questions are as follows :
1. Can we use stationary data for PMG and/or MG
2. What is the ideal dimension of T and N to use PMG and /or MG.
I will be waiting for your response.
Regards.
Timmy John
7 years, 4 months
ISO 3166
by Stefano
nice idea, Allin! I was thinking that since numeric codes may prove
easier to handle in some circumnstances, if it wasn't much trouble the
numeric field 3166-1 could also be included (although I checked and
apparently that is also flawed, Wurzistan is missing).
thanks,
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/
7 years, 4 months
country codes function
by Allin Cottrell
I've been working lately with some students running cross-country
regressions, and it struck me it would be nice to have a convenient
way to map between country names and the two- or three-letter codes
for countries -- the former are often found in cross-country data
files but the latter are generally more usable in plots.
So we now (in git and snapshots) have a function, isocountry(), to
do that job using the ISO 3166 country information. We handle three
elements from ISO 3166:
1 Country name
2 2-letter code
3 3-letter code
The basic idea is that we take one of these as input and return one
of the others (or the same one, see below) as output.
The function (not yet formally documented) takes two arguments:
* A string, or array of strings (required)
* An integer (optional, may be omitted)
It returns either a string or an array of strings, matching the type
of the first argument.
The second argument (1, 2, or 3), if supplied, says which of the
three forms above you want on output. If the optional argument is
omitted the default is to convert from 1 to 2 (if form 1 is given on
input), or 2 to 1 (if 2 is given), or 3 to 1. If input is given that
is neither two nor three upper-case characters we try to interpret
it as part of a full country name. In that case we try to return the
country's 2-letter code, but a second argument of 1 can be given to
return the full name (if a partial match is found).
Here are some examples:
<gretl>
? eval isocountry("Bolivia")
BO
? eval isocountry("Bolivia", 3)
BOL
? eval isocountry("GB")
United Kingdom of Great Britain and Northern Ireland
? eval isocountry("GB", 3)
GBR
# try some abbreviations
? eval isocountry("Vanua")
VU
? eval isocountry("Zimb")
ZW
? eval isocountry("Zim", 1)
Zimbabwe
? eval isocountry("Wurzistan")
isocountry: 'Wurzistan' was not matched
? strings S = defarray("ES", "DE", "SD")
? strings C = isocountry(S)
? print C
Array of strings, length 3
[1] "Spain"
[2] "Germany"
[3] "Sudan"
? C = isocountry(S, 3)
? print C
Array of strings, length 3
[1] "ESP"
[2] "DEU"
[3] "SDN"
</gretl>
This is implemented as a "plugin", so the ISO 3166 table is not
bloating gretl's memory footprint unless you have reason to use it.
Comments welcome, if anyone has ideas for making this more useful.
Allin
7 years, 4 months
Guide on correlation matrix and Forecasting
by Olasehinde Timmy
Dear Professors,
Please, I need you to put me through on two things.
First, how can I save a correction matrix using hansl syntax.
Secondly, I want to perform a forecasting after estimating through maximum
likelihood. For example, as shown below,
mle ll = "likelihood function"
series e = GDPrate - constant
params constant
end mle
If I want to perform the dynamic forecast or one step ahead forecast, what
is the additional syntax needed.
I hope to receive your response soon.
Regards
Timmy John
7 years, 4 months
Saved results from dpanel
by Laura Magazzini
Hi!
I am running a system GMM estimator for dynamic panel data models.
I need to perform some computations after the second step estimation than involve the matrix of instruments, the matrix of regressors (both differenced and level), and the weighting matrix used in computation of the system GMM (obtained from first step estimates).
Is it possible to recover these information after the dpanel command?
Would also be possible to compute the Ahn & Schmidt non linear panel data estimator in gretl? Should I program it by myself using gmm?
Thank you
Laura
7 years, 4 months
DBnomics problem
by Andreas Zervas
Dear Allin and Ricardo,
I would like to report some problems I encountered using DBnomics database from Gretl. They are the following:
a) If the data series does not exist, it crushes Gretl.Try to download: Eurostat/ei_bssi_m_r2/M.BS-ESI-I.SA.IE (Ireland does not report Economic Sentiment Indicator)
b) If you try to download data with some missing values it stops with error; try:
open dbnomics
data Eurostat/namq_10_gdp/Q.CLV10_MEUR.NSA.B1GQ.DE --name="DE_y_nsa"
data Eurostat/bop_iip6_q/Q.MIO_EUR.FA.S1.S1.N_LE.WRL_REST.DE --name="DE_niip"
Here the problem is that Q.MIO_EUR.FA.S1.S1.N_LE.WRL_REST.DE reports only Q4 values for the years 1999 - 2003, before it starts reporting all quarterly values from 2004 onwards.
I guess the crush should be considered a bug. It would be very helpful if you could fix at least the first problem. My system is Win 10 with Gretl 2018b.
Many thanks for the good work.
Andreas
7 years, 4 months
Structural VECM and DSGE
by Olasehinde Timmy
Dear Professors,
I am glad to inform you that Gretl is gaining more ground in my country
Nigeria nowadays. However, I will like to make few suggestions to add to
its usefullness.
I think there is a need to develop a special GUI for SVECM and to support
both long and short run restrictions. If possible, it can be linked with
the VECM output in order to fetched its estimates from the beta-alpha
matrix.
Moreover, I suggest that Gretl should be developed to handle DSGE modeling.
I think my opinion makes senses and I wish to hear from the developers
(Allin and others) soon.
Regards.
Timmy John.
7 years, 4 months
Re: [Gretl-users] Saved results from dpanel
by Laura Magazzini
I will surely let you know shortly
laura
Date: Mon, 26 Nov 2018 18:06:06 -0500 (EST)
From: Allin Cottrell <cottrell(a)wfu.edu>
To: r.lucchetti(a)univpm.it, Gretl list <gretl-users(a)lists.wfu.edu>
Subject: Re: [Gretl-users] Saved results from dpanel
Message-ID:
<alpine.LFD.2.20.3.1811261750420.12454(a)myrtle.attlocal.net>
Content-Type: text/plain; charset=US-ASCII; format=flowed
________________________________
On Mon, 26 Nov 2018, Riccardo (Jack) Lucchetti wrote:
________________________________
> On Sat, 24 Nov 2018, Laura Magazzini wrote:
>
>> Hi!
>>
>> I am running a system GMM estimator for dynamic panel data models.
>>
>> I need to perform some computations after the second step estimation than
>> involve the matrix of instruments, the matrix of regressors (both
>> differenced and level), and the weighting matrix used in computation of the
>> system GMM (obtained from first step estimates).
>>
>> Is it possible to recover these information after the dpanel command?
>
> In normal circumstances, the info you need is not useful to the user and I'd
> avoid storing it into the $model bundle because typically these are very
> large matrices.
>
> On the other hand, it would be very time consuming for the user who needs
> those matrices to reconstruct them in hansl, so Laura's request is perfectly
> legitimate IMO. So, I'm attaching a patch which introduces an option to the
> dpanel command named --keep-extra. After applying the patch, if you run the
> dpanel command with the --keep-extra option, you get two new elements in the
> $model bundle, named "Z" (the instrument matrix, transposed) and "A" (the
> weights).
>
> I haven't pushed this to git yet because I this this is a rather sensitive
> change and I'd like Allin to approve it (especially because there's a fair
> chance I've f****d up memory allocation, as I regularly do when I write C
> code).
The patch looks good to me, and I've now committed the change.
Perhaps Laura could tell us if the new "A" and "Z" matrices in the
$model bundle -- after estimation with "dpanel" and the --keep-extra
option -- do the job for her.
(But note that this update is not yet in the gretl snapshots, only
the git source code. Snapshots should follow tomorrow.)
[Geek note on memory management: the new code sticks the extra
matrices onto the model using gretl_model_set_matrix_as_data().
The first thing we need to know is: does passing a matrix via this
function amount to "donating" the matrix to the model, or will it
take a copy of the matrix passed? The fact that the matrix parameter
to the function in question is _not_ marked as "const" suggests
strongly that it's case of donation, and that's correct. Next
question: would it be OK to donate the source matrix? In this case
the answer is No, since both matrices are members of a "matrix
block" and so do not have independently allocated memory. Therefore
we must copy the relevant matrices before passing them. And that's
exactly what Jack's code does, so it's perfectly correct!]
Allin
7 years, 4 months
Positive matrix not definite
by Olasehinde Timmy
Dear Professors,
In many occasions, I did stucked with the non converge problem. Please, how
can I resolve this issue like that of RATS program that will report the
parameters even not converge condition is not met.
Thanks.
7 years, 4 months
GUI problems
by Timothy Lachlan-Cope
Hey,
With a fresh install of Gretl a few of the GUI buttons don't work, such as adding variables into models. I can use double click for dependent, arrows for independent, but then I am stuck if I want to add instruments.
Thanks
Tim
7 years, 4 months
Re: [Gretl-users] Saved results from dpanel
by Laura Magazzini
Thank you Sven
As for the weighting matrix, I would like to access the two-step version of the AN matrix in formula (21.5) from the Guide.
in the formula of AN after (21.5) the matrix H* is considered for computation, so that, as far as I understand, this is the matrix used to obtain first step results.
The two-step version would replace the matrix H* with cross-products of first-step residuals (residuals estimated on the basis of first-step coefficients).
I hope this clarifies what I was referring to.
However,as the matrix of instruments is not available, I would need to use a different approach.
Kind regards
Laura
Date: Sat, 24 Nov 2018 14:03:46 +0100
From: Sven Schreiber <svetosch(a)gmx.net>
To: gretl-users(a)lists.wfu.edu
Subject: Re: [Gretl-users] Saved results from dpanel
Message-ID: <58f8ce83-c5ec-a7ce-2642-9dfbe58adecc(a)gmx.net>
Content-Type: text/plain; charset="windows-1252"; Format="flowed"
Am 24.11.18 um 10:43 schrieb Laura Magazzini:
>
> Hi!
>
> I am running a system GMM estimator for dynamic panel data models.
>
> I need to perform some computations after the second step estimation
> than involve the matrix of instruments, the matrix of regressors (both
> differenced and level), and the weighting matrix used in computation
> of the system GMM (obtained from first step estimates).
>
> Is it possible to recover these information after the dpanel command?
>
Hi, that's a very good question, and currently it seems to me that the
answer is no.
What you can get after the dpanel estimation is the list of regressors
in $xlist. However, I just checked it and it doesn't include the lagged
endogenous variables; maybe it should.
Also, while you can get the list of instruments after a regular 'tsls'
estimate via $model.instlist (a little hidden as well, maybe a direct
$instlist accessor should be added), for dpanel there is no such thing
in the $model bundle AFAICS.
So I guess you pointed out some gaps in gretl that should be filled.
About the weighting matrix: Maybe you could describe in the notation of
ch.21 of the guide which matrix exactly you are referring to.
> Would also be possible to compute the Ahn & Schmidt non linear panel
> data estimator in gretl? Should I program it by myself using gmm?
>
I am almost certain that setting up a gmm block for that estimator is
feasible in hansl, but I'm not familiar with it, so I cannot provide any
further advice there.
cheers,
sven
7 years, 4 months
Mmultinormal likelihood
by Olasehinde Timmy
Dear Professors,
I am writing to ask for your guidance. I am trying to estimate a system of
two variables jointly using multinormal distribution, however, my effort
has not been successful.
Please, see the code/syntax I am trying to run in the bold form below.
Could you please help to see if something was not right with the code.
I hope to receive a response from you soon.
#The hansl syntax#
*scalar beta1= 4.3 *
*scalar beta2= 0.16 *
*scalar alfa1= 0.0097*
*scalar alfa2= 0.02*
*scalar mlog2pi = 2*log(2*acos(-1))*
*series e1= a - beta1 - beta2*a(-1)*
*series e2= b - alfa1 - alfa2*b(-1)*
*series es1 = e1^2*
*series es2 = e2^2*
*series v1= var(e1)*
*series v2= var(e2)*
*series v12 = cov(e1,e2)*
*series de = v1*v2 - v12^2*
*series iv1 = v1/de*
*series iv2 = v2/de*
*series iv3 = v12/de*
*mle ll = -0.5*(mlog2pi + log(de) + (iv1*es1 + iv2*es2 + 2*iv3*e1*e2)) *
* params beta1 beta2 alfa1 alfa2*
* end mle*
Yours faithful
Timmy John
7 years, 4 months
Multinormal
by Olasehinde Timmy
Dear Professors
I am writing to ask for your guidance. I am trying to estimate a system of
two variables jointly using multinormal distribution, however, my effort
has not been successful.
I have attached the document that contains the code I am trying to run.
Could you please help to to see if something was not right with the code.
I hope to receive a response from you soon.
Yours faithful
Timmy John
7 years, 4 months
Re: [Gretl-users] change to the list
by Stefano
My vote is the for mailing list format: while I read all the (useful)
messages appearing in my mailbox my visits to the forums which in
principle interest me are much more irregular.
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/
7 years, 4 months
upcoming change to the list!
by Allin Cottrell
Dear gretl users,
For years this list has been hosted by Wake Forest University, but
I've recently heard that WFU is going to discontinue support for
mailing lists. We have (I think) about 6 weeks' grace; beyond that
we'll have to come up with an alternative. Three ideas are under
consideration:
(1) Stay with the mailing list format, if we can find another
suitable host.
(2) Migrate to a Google Group. (It's my understanding that you don't
need to have a gmail account to participate in such a group.)
(2) Re-frame gretl-users as a forum (or set of topic-specific
forums) on Sourceforge.net.
If you have a strong preference, you might wish to let us know!
Allin Cottrell
7 years, 4 months
Re: [Gretl-users] Gretl-users Digest, Vol 142, Issue 10 upcoming change to the list!
by Alecos Papadopoulos
Gretl deserves more than just being a tag on a gargantuan Statistics
site like stats.SE (even if it is a respectable and quality site).
We should consider creating a new stack.exchange site exclusively for
Gretl. This can accommodate users and developers alike (here
tag-separating is ok), and will create a proper Gretl world. Initial
viability and content of the site should be guaranteed, because we could
"ask and answer" there, selected issues that have come up in the past
and dealt here, and are still relevant.
Alecos Papadopoulos PhD
Athens University of Economics and Business, Greece
School of Economic Sciences
Department of Economics
On 16/11/2018 23:08, gretl-users-request(a)lists.wfu.edu wrote:
> On Fri, 16 Nov 2018, Henrique Andrade wrote:
>
>> Em sex, 16 de nov de 2018 ?s 18:23, Boris Demeshev
>> <boris.demeshev(a)gmail.com> escreveu:
>>> Migrate to stats.stackexchange.com. Under the 'gretl' tag. It will also promote gretl visibility.
>> It's a good point:-)
> I guess that would be good for the users list. Not so sure about points
> related to the development.
>
> Perhaps we could encourage people to use stackexchange for question on
> "how to do this and that" in hansl/gretl and migrate to a forum for the
> discussion on development (new features, function pachages etc).
7 years, 4 months
Could we please make the default graphing style nicer?
by Artur T.
Dear all,
this is a proposal which I have had in mind for a long time. Before
starting, this thread is really just meant as a proposal, so please
don't take it personally at all! :-)
We all like gretl and gnuplot very much. But let's be honest, gnuplot's
default plotting settings are not fancy at all. When I introduce gretl
to potentially interested people, I instantly add "Not, this program is
not from the 1990s, and yes, you can make the graphs much more fancy by
your own".
I am totally aware of the possibility to customize plots in a flexible
manner using gretl but why not producing a "nice" graph per default for
the user. Just compare the two graphs I attached. Isn't the RHS one not
just more attractive? It only adds 3 additional lines of code and
selects nicer colors and replaces crosses by points (pt 7):
<extra-gnuplot-lines>
# replace the default settings
set linetype 1 lc rgb '#1B9E77' pt 7 # dark teal
set linetype 2 lc rgb '#D95F02' pt 7 # dark orange
set linetype 3 lc rgb '#7570B3' pt 7 # dark lilac
set linetype 4 lc rgb '#E7298A' pt 7 # dark magenta
set linetype 5 lc rgb '#66A61E' pt 7 # dark lime green
set linetype 6 lc rgb '#E6AB02' pt 7 # dark banana
set linetype 7 lc rgb '#A6761D' pt 7 # dark tan
set linetype 8 lc rgb '#666666' pt 7 # dark gray
# add Axes
set style line 11 lc rgb '#808080' lt 1
set border 3 back ls 11
set tics nomirror out scale 0.75
<extra-gnuplot-lines\>
I know that the meaning of "nice" is very subjective but I am sure we
could find a compromise with regard to this ;-)
Thus, I would like to propose to change the default plotting settings.
For instance, have a look at the seaborn package for Python. Those
graphs look really attractive per default.
Another gnuplot example is a graph as you can find it here, and which
uses a nice color scheme for lines and the borders.:
http://www.gnuplotting.org/ease-your-plotting-with-config-snippets/
I also found a nice collection of color paletes for gnuplot here:
https://github.com/Gnuplotting/gnuplot-palettes
https://github.com/aschn/gnuplot-colorbrewer
For scatter plots I also suggest to plot points instead of crosses per
default -- it just looks more fancy :-)
Please let me know what you think about this idea.
Best,
Artur
7 years, 4 months
gretl.pid: No such file or directory
by Marcelo Duarte
This error was reported here:
http://lists.wfu.edu/pipermail/gretl-users/2014-May/010061.html
but it was an off topic.
I'm using gretl2018c and on Win7.
Regarding "D:" and "C:", I have two disk partitions (C: and D:), where
gretl is installed in C: and the directory where I work is in D:.
Note: something went wrong with my previous post, the correct error message
I'm getting is:
"Couldn't create directory 'D:\<...>\'
C:\Users\<...>\AppData\Roaming\gretl\gretl.pid: No such file or directory
C:\Users\<...>\AppData\Roaming\gretl\gretl.pid: No such file or directory"
Thank you for you fast answer,
Marcelo
Am 11.11.18 um 16:18 schrieb Marcelo Duarte:
> >
> >
> > I've seen a similar error reported before in this list but was related
> > to GARCH.
>
> Can you point to this earlier report, or tell us in which month it
> happened?
>
>
> > Couldn't create directory 'D:\<...>\AppData\Roaming\gretl\gretl.pid:
> > No such file or directory
> > C:\Users\<...>\AppData\Roaming\gretl\gretl.pid: No such file or directory
>
>
> So you're on Windows. BTW, is the "D:" vs. "C:" thing correctly
> reproduced here?
>
> What gretl version are you running?
>
> thanks,
>
> sven
***
>
7 years, 4 months
a simple question about arima command output
by oleg_komashko@ukr.net
Dear all,
The question is:
how gretl computes frequencies for
arma polynomials roots, e. g.
Real Imaginary Modulus Frequency
-----------------------------------------------------------
AR
Root 1 -1.4519 1.7203 2.2511 0.3616
Root 2 -1.4519 -1.7203 2.2511 -0.3616
Root 3 1.7744 0.0000 1.7744 0.0000
-----------------------------------------------------------
Oleh
7 years, 4 months
gretl.pid: No such file or directory
by Marcelo Duarte
Hello everyone,
I've come across an error while using the RE estimator for panel data and I
couldn't find an answer anywhere on the internet.
I've seen a similar error reported before in this list but was related to
GARCH.
The situation is as follows:
- An unbalanced panel of 455 observations
- 1 dependent variable
- 9 independent variables (3 of them are time-invariant)
When using a linear-linear, lin-log or log-lin, specification everything
runs well.
When using a log-log specification, both pooled OLS, FE and RE returns the
same error window:
Couldn't create directory 'D:\<...>\AppData\Roaming\gretl\gretl.pid: No
such file or directory
C:\Users\<...>\AppData\Roaming\gretl\gretl.pid: No such file or directory
I didn't saw any reference to this in sourceforge bug tracker, so I'm
inclined to think that I'm overlooking something.
Thanks in advance for the help,
Marcelo Duarte
7 years, 4 months