Current gretl CVS and the Windows snapshot at
contain release candidate 1 for gretl 1.7.6.
Please note that this version involves a backward-incompatible
change with respect to gretl 1.7.5 and earlier, affecting
user-defined functions that (a) take a named list of variables as
an argument and (b) do things with the list-member variables by
means of a "foreach" loop on the list.
I won't go into the rationale for this change here. Anyone who
wants the details may look at the proceedings on the gretl-devel
list for July, which were mostly taken up with this issue:
There's also a brief discussion in the chapter of the User's Guide
that deals with user-defined functions. But here's the bottom
line for users:
* If you want to "get hold of" a list-member variable in the
context noted above, you have to use the syntax listname.varname,
where listname is the name of the list in question and varname is
the name of the list member. (This is required only if you're
working with a list that was supplied as a function argument.)
Trivial example: inside a function, creating new variables which
are the cubes of the members of an original list, xlist, where
xlist is an argument to the function.
loop foreach i xlist
$i_3 = $i^3
loop foreach i xlist
$i_3 = (xlist.$i)^3
In the new scheme, "$i" gets the name of the list-member variable
alright, but the variable is not "visible" under that name within
the function. So on the right-hand side of the expression that
creates the cubes, we need "(xlist.$i)^3". (Well, actually the
parentheses are not required, but wearing your seatbelt is in
general a good idea.)
Although this may affect quite a large number of existing
functions, we believe the effects are localized and the update
should be trivial. If anyone has a function for which the update
is _not_ trivial, please let us know.
On Thu, 25 Jun 2009, Talha Yalta wrote:
> I think it would be really neat if there was a left and right
> arrow next to the variable name in the "edit attibutes" window
> so that one can easily edit or update a bunch of variables,
> their descriptions etc. without closing an reopening the window
> each time. What do you think?
Good idea, and it's now implemented -- well, via Up and Down
buttons. You can also select the variable to edit, with the Edit
Attributes dialog open, by clicking on its row in the main window.
Changing the variable in this way does not automatically commit
any changes to the current variable: use the "Apply" button to do
Also, responding to an older request, the column headings in the
gretl main window are now clickable and can be used to sort the
variables by ID number or name, ascending or descending.
I tried to program a little request which looks like:
loop foreach i x y
ols $i const time --quiet
genr t_$i = $coeff(time)/$stderr(time)
if t_$i < abs(1.97)
adf 8 $i --c --test-down
adf 8 $i --ct --test-down
I define the request of the t-values as absolute values ( abs(1.97) )
but gretl does not consider this for negative ones. Though the t-value
is e.g. -3.37 it does not take into account that the absolute value is
bigger than 1.97. For positive t-values there is no problem.
Do you know what the problem is?
I will be out of the office starting 06/27/2009 and will not return until
Hi All, I will be out of the office from Monday, June 29 until Monday, July
13, returning to the office the morning of July 13. Please, after July 7,
if you have any questions regarding Cost Model or Construction Economics,
please email or contact Bradley A Njus at 510 625 4595.
Hi everyone. I've been using Gretl for almost two months and I think is a
really great software for econometric analysis. I want to request another
test for Heteroskedasticity, I see there's some tests already in Gretl, but
I don't see the Goldfeld-Quandt contrast and since I'm not that good on
Gretl's commands I'm having a hard time trying to do that test.
Well, that's pretty much my request... thanks to all.
Mi Blog: http://manoinvisibleinexistente.blogspot.com - La mano invisible
e inexistente de Adam Smith
I have a question concerning observation numbers for specific dates. I have a time-series dataset with daily data (5 obs per week) and I would like to estimate my model once a week, every wednesday. The subsample, for which the model is estimated, should be shifted by a week for every estimation. The problem is how can I get the the observation numbers for these dates?
My first idea was to get manually the obsnum for the first wednesday and then to add 5 in order to advance one week. But due to holidays and other missing observations this will change the weekday on which the model is estimated in the course of time.
My second idea was to generate a list of all wednesdays on which the model should be estimated. By using obsnum one could get the observation num for the each wednesday. But obsnum will return NA if there is no date for the wednesday, perhaps due to a holiday. In this case I would like to estimate the model on tuesday or thursday. I could write another function around obsnum which deals with these exceptions.
But before doing so, I wanted to ask you if theres an easier solution to my problem?!
While updating the Turkish translation today, I noticed a bunch of
small errors or glitches. Nothing critical but still important for the
sake of perfection:
1)-In a scatter plot with a fitted line, in the edit window, selecting
"none" for the fitted line leaves the title of the plot unchanged.
Choosing other options update the title string as expected (with loess
2)-In the gretl plot controls, after choosing the "logarithmic scale,
base:" option, the box on the right doesn't become white (stays gray)
immediately. Also, in the labels tab, if the user chooses "add..." and
doesn't do anything, the empty label is not automatically removed
after closing the window. I think I have mentioned this little glitch
before and you said this is low priority but I think it would be nice
if you could fix this because it becomes annoying once you know it is
3)-In the USMacroM.gdt (Stock & Watson 2e) dataset, doing Hurst
exponent on the variable IP causes an error message. Other variables
work OK. This happens in the Turkish translation and not in the
4)-When there is a large number of observations (such as over 500 in
USMacroM.gdt), for forecasting, using "error bars" for the confidence
interval creates a messy graph where the observations and the
forecasts are completely covered with the error bars.
5)-Again using the USMacroM.gdt dataset. I estimate the GMM model
where IP is the dependent variable, OIL_1, CPI_1 and PCED_1 are the
independent variables and OIL, CPI and PCED are the instruments (just
for quickly testing the output window). Gretl creates an icon named
"gmm___V" and trying to open this causes the error message "Couldn't
open 'of the regression'..." Moreover, with the Turkish translation,
this error message has weird characters such as "Q '..." or "'
6)-Item 1038 in the pot file: Number of cases `correctly predicted'
This, I think is for LaTeX output and the resulting string has the
additional " = xxx (xx percent). This additional "percent" part is not
translatable from the po. The same is true for the program output
string, which has the additonal part reading " = xxx (xx%). This
percent sign may need to be put before the number xx in some
7)-After omitting variables from a model, I think it would be a bit
compact and tidier not having empty lines right after "Comparison of
Model..." as well as the "Null hypothesis: the regression parameters
are zero for the variables" line and finally before the "Test
statistic: F..." line. Also, here wouldn't it be better to say
"variable(s)" since there can be just one variable?
8)-In the ANOVA model estimation output window, the strings "response"
and "treatment" are not translated.
9)-In the sort data... window, the string "Select sort key" is not
marked for translation.
10)-When adding an index variable or a time trend, the name is
automatically set as "Index" or "time". Is it possible that these
strings are translatable?
11)-In the about window, I think it would be a bit better if the
"build date..." string was written in paranthesis. Also, you have told
me in Bilbao that it would now be possible to put an url in the about
12)-Finally, the labels in the summary statistics window cannot be not
aligned properly in my translation. Here is what I get:
Özet istatistikler, kullanılan gözlemler: 1 - 51
Ortalama Ortanca Enaz Ençok
exphlth 15,265 10,066 0,99800 94,178
income 105,13 64,100 9,3000 683,50
Ölç. Sap. D.K. Çarpıklık Basıklık
exphlth 17,888 1,1718 2,4497 6,8380
income 125,30 1,1918 2,5931 8,0094
I hope these are useful.
A. Talha Yalta
"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)
I've downloaded the windows snapshot (1.8.1cvs 2009-06-18) this morning. It seems to have problems when decrementing scalars. The following programm fails
in the last line, saying "command d unknown", or "Befehl 'd' unbekannt" in german. I've downloaded current cvs this morning and compiled it under linux. This version has no such problems.
I just checked the windows build version 1.8.1 from sourceforge. It gives the same error. Is this perhaps a problem of my own configuration?! Could someone please check whether he has the same problems under windows?!
i`ve been trying to make forecast with a garch model.
For example, using the data djclose, i wrote the code below:
open djclose # open data
genr return=ldiff(djclose) # generate returns
garch 1 1; return # garch(1,1)
Question: From here, what gretl code i can use to make a 'out of sample' forecast to the dow jones return serie(return) - for example, for the days 1/2/1990,1/3/1990,1/4/1990 - with a 95% confidence interval?
Veja quais são os assuntos do momento no Yahoo! +Buscados
I'm using the autoreg feature of gretl quite often. Recently I came across some inconsistencies when combining lagged and non-lagged series within functions. I have attached a sample script that creates 3 series using different autoreg statements. Mathematically these statements are equivalent, but they yield different results.
For the last statement, gretl caches the initial result of the fracdiff call and recycles these results for each autoregression iteration. I have attached a one-line patch which disables this behaviour.
I must admit that i'm new to gretl, so I don't know whether this behaviour is not a bug but a feature nor can I maesure the effect of this patch on other parts of the code. But IMHO all equivalent expressions should yield the same results.
Additionaly for my diploma thesis I have added a command to gretl which computes the bessel function. The function is implemented using the gsl library. I would like to contribute this to gretl, too, but I don't know how you feel about linking against gsl? I have seen that you use a copy of cephes functions for some calculations, but AFAIK cephes doesn't provide bessel functions for non-integer orders. If this has a chance of inclusion I will clean up my implementation, write some docs and submit this as a patch.
Thanks for your help,