Dear fellow gretl users,
from now on all new gretl bugs and missing features will be collected in
the corresponding "trackers" on the sourceforge project page for gretl.
(http://sourceforge.net/projects/gretl/, then click the "Tracker" tab
and choose "Bugs" or "Feature Requests")
Of course you can always discuss your issue here on the users' list as
well, the database is just an additional option so that your problem
will not be forgotten.
The way the trackers are currently set up, you don't have to register
with sourceforge to submit new issues. I will try to keep the databases
in an organized state, let's see how well it goes...
Please report any problems you may have with the trackers here on the
I am using gretl 1.6.6 now. It seems that the constant term in the
mean equation of ARCH/GARCH estimation is automatically added though
the default function by click \Model\Time series\ARCH or GARCH looks
that the const as a independant variable can be removed.
Is it required to have a constant term in the mean equation of
ARCH/GARCH? Is it possible to remove the constant term in the mean
equation with ARCH/GARCH estimation?
Chung Yuan Christian University, Taiwan
I thought the following might be of interest to people who work in
---------- Forwarded message ----------
Date: Thu, 25 Oct 2007 11:44:59 -0400 (EDT)
From: Allin Cottrell
To: Mohammad (Mitu) Ashraf
Subject: Re: Gretl and PUMS Data
On Wed, 24 Oct 2007, Mohammad (Mitu) Ashraf wrote:
> I am an associate professor of economics at UNC-Pembroke. I just
> started using Gretl for my research. I am switching from SAS.
> First of all, I want to thank you and your colleagues for
> developing such a wonderful tool.
> I have been trying to figure out how to Gretl for Public Use
> Micro Data Sample (PUMS). I am wondering if you can point me in
> the right direction. Your response is greatly appreciated.
I haven't made much use of PUMS data myself, but here's what I
found on quick experimentation. I went to
and downloaded the 2006 Population Records for North Carolina in
CSV format. Gretl was close to being able to read this straight
off, but there was one problem.
When gretl encounters non-numeric data for a particular variable
in a CSV import it treats the values of that variable as strings,
constructs a numeric coding, and creates a "string table" that
presents the coding to the user. BUT this is done only if
non-numeric data are encountered in the first data row for the
variable in question. That is, if we read (apparently) numeric
data on rows 1 to k-1, then encounter non-numeric data on row k,
we flag an error and stop reading.
The trouble is that some of the PUMS variables are codings, some
but not all values of which contain non-numeric characters. For
example, NAICSP, the "NAICS Industry Code", which has values
(among others) of 1133 and 113M.
Here's a solution, perhaps not permanent if we can think of
something better: I've added a new parameter to the "set" command,
namely "codevars". You can do, for example,
set codevars NAICSP SOCP
prior to importing a CSV file. This tells gretl that the
variables NAICSP and SOCP should be interpreted as string-coded,
even if the first values look to be numeric.
(In general you say: "set codevars <varnames>", where <varnames>
is a space-separated list of names. You can say "set codevars
null" to clean out the list.)
For the North Carolina PUMS data, this now works to open the file
set codevars NAICSP SOCP
This feature is in CVS gretl, and also in the current Windows
You may have to engage in some trial and error. I've beefed up
the error reporting a little. So, in relation to the example
above, if you do
set codevars NAICSP
you then see:
Variable 106 (SOCP), observation 12, '434XXX':
Extraneous character 'X' in data
which in effect tells you that you need to add SOCP to the
"codevars" list -- if it seems to you that 434XXX is a legtitimate
value for that variable.
I am writing a function that, when used with some bad input variables,
breaks with the following error message:
No observations would be left!
>> smpl group != groupremove_k --restrict
I would prefer to have the possibility to
a) Prevent these error messages from the output and instead provide my own
error message, e.g. funcerr "ERROR: No observations left!"
or, if this is not possible,
b) prevent the error message ">> smpl group != groupremove_k --restrict"
from the output and only have the output "No observations would be left!".
How should I do this in a gretl function?
Hi all, I'd been usng Gretl for over 3 years now and I need it to do two
tests: Bartlett's Test and Levene's test for Homogeanity of Variance, to use
them in the residuals of some models. Currently I'm working on Bartlett's
Test function (I'm just beggining to use the function editor in Gretl, be
nice) and I'm stuck here:
function bartlett (series y, series x, int numbin)
#Bartlett's test for Homogeanity of Variances
rango = max(x)-min(x)
binswidth = rango/numbin
printf "Width of Categories = %2.3g\n", binswidth
maxband = min(x)+i*binswidth
lowband = maxband-binswidth
genr sample = (x<=maxband&x>=lowband)
smpl sample = 1 --restrict
I'm starting to separate the groups, but the genr function is doing nothing.
Could some-one please check what is wrong and give me feed back. I just want
it to generate the sample variable, in order to use it as a restriction to
create a subsample. The i variable is going to be use for a loop so don't
worry about that.
The thing is that when I do the "genr sample =
(POPM<=maxband&POPM>=lowband)" code in Gretl's console it does it allright
but when I do it as a function "? bartlett(RESID01,POPM,5)" it does nothing,
it only shows the printf output, but it doesn't generates the sample series
and much less changes the sample size of the workfile.
Thanks for your help.
Marcos Larios Santa Rosa
I installed X-12-ARIMA with the debian package. The installation was
succesfulll and I can run it from the terminal with ~$ x12a but I don't
succed to use it from Gretl.
- Writing arma 2 3; unemp --x-12-arima leads to an error message
-The option "X-12-ARIMA" doesn't appear in the menu (it's stay in gray).
I looked in the options and the path to X 12 Arima seems to be correctly
x12a, which I could successfully use from the terminal. (The others
options I could try, Web Navigator or PDF reading work)
Should I do something more? Are you able to launch x-12-arima?
Thanks a lot!
I find the possibility of launching and using R directly from Gretl very
good! I appreciated still more the fact that the variables in Gretl were
automatically present and ready to use for R. You made a very good job!
As a further step (or is this already available and I just didn't see
it?) it would be really great if there would be the possibility to run
scripts to R from Gretl. The reasons are:
-R is also for econometrics a real good programm and has a lot of
interesting packages (just have a look on "strucchange" or "urca" for
-The GUIs for R aren't for now really convincing (maybe with the
exception of RKward?), or not oriented to econometrics. This would make
- I think- Gretl still more interesting!
What do you think about this? (I know, it's always easy to suggest, more
complicated to make)
I know, everyone in the academic world is busy: there are classes
to teach, papers to be written, papers to be refereed, conferences
to attend, and so on.
I'm subject to all these pressures myself, and I spend just about
all of my "spare time" coding gretl. The result is that I'm not
able to devote time to various things that, I think, would help us
all ("us" being people who think gretl is of value). Here are
three things that I think would be helpful, one of which has
already been done, and two of which remain to be done. If you
feel you could contribute in any of these ways, please do!
1) Writing articles, or putting up websites, that explicate gretl
for people who haven't heard of it. This has been done. For
example, Tadeusz Kufel has a website that brings gretl to a Polish
constituency; Talha Yalta, Ryan J. Smith and J. Wilson Mixon Jr.
have published papers that assess gretl; and Lee Adkins has an
excellent online guide to econometrics using gretl.
2) A Free/Open-Source Software award for gretl: Why haven't we won
a prize yet? The obvious answer is that gretl is a relatively
specialized piece of software; it's not something that _most_
desktop users will have a need for, or _most_ sysadmins.
But if someone had a a little spare time for research: Who awards
such things and how are the nominations assessed? I'm not the one
to say this, but it seems to me that -- leaving aside the famous
"LAMP stack" of Linux (kernel), Apache (web server), MySQL
(database) and PHP (web scripting language) -- gretl is one of the
best conceived and most functional open-source projects in
existence. Of course, this is not just thanks to me and Jack
Lucchetti -- it's also due to the careful bug reports and detailed
suggestions submitted by many of you over the years.
So, what about it? A little recognition in the open-source
community at large would be morale-booster for everyone working on
3) A gretl conference? We have people with more than a casual
interest in gretl in at least half-a-dozen (6) countries. Is
there anyone who might be interested in organizing a conference to
bring us all together? My thought is that such an event would not
simply bring _us_ together, but might also form a focal point that
would bring in other _potentially_ interested people. For
example, graduate students with computing expertise! The
conference agenda could be broader than gretl: it could be, for
example, something like "open-source approaches in statistical
Department of Economics
Wake Forest University, NC
I have recently noticed 2 small annoyances:
1)- I have a dataset involving dates between 1998-2007. Observations
are twice a year (June and November)
Nomatter what I tried i wasn't able to make gretl recognize this
properly as a time series.
I cant even make this recognized as 6monthly data.
Trying a format such as 11/01/98 results in the data not recognized as
time-series at all.
Trying 1998:1... resullts in a quarterly data ending in 2002.
2)- When I create scatter plots, the fitted line is in blue, however,
once saved as eps, it becomes green, which is difficult to see using a
"Remember not only to say the right thing in the right place, but far
more difficult still, to leave unsaid the wrong thing at the tempting
moment." - Benjamin Franklin (1706-1790)
For anyone using current CVS gretl or the Windows snapshot: I've
added a datafile and sample script pertaining to the possible role
of corruption in last month's ISO vote on Microsoft's "Office Open
XML". See http://www.effi.org/blog/kai-2007-09-05.en.html
The files are ooballot.gdt and ooballot.inp.
At effi.org there are analyses using Fisher's Exact Test and the
Rank Sum test (done with R). The gretl script replicates those,
but also includes an ordered probit, which seems to provide
stronger evidence for the claim: the greater the degree of
"perceived corruption" in a country, the more likely was a
favourable vote for MS.