I've just read about the non-parametric Mann-Kendall test for a trend
(hence my recent postings about Kendall's tau and ties in a series).
It looked pretty easy, so I'm attaching an attempt at a basic
implementation. Full disclosure: I've used the description from
the basic version in section 1.1).
All you have to do is call "MannKendall(x)", where x is your series of
I'd be happy about feedback regarding cross-checks and correctness (for
example in the above document in equ. (4) the case S>0 wrongly appears
twice, and I had to make an educated guess where to switch the
signs...), whether it should become a function package and so on.
see feature request #85 (by myself I must admit):
Currently a function with a list as a return type must internally set
the names of the list members (series) and the those names are
automatically exported to the function caller. If series with those
names already exist in the outer scope (at the caller level), they would
be overwritten. This is an exception of gretl's principle of function
I'm suggesting: To provide a cleaner solution of this name clash
problem, such a list-returning function should also accept a string
array argument. The string elements in this array would be used by the
function as the names of the exported list members.
In this context it would be useful to have a built-in easy mechanism to
take the labels from the string array and use it for the returned list
(inside the user-defined function). That is the concrete request right now.
I'm not suggesting to make this thing mandatory any time soon, because
of the backward-compatibility issue.
thanks for today's last-minute additions and fixes.
One other thing: Could it be that the settings for a network proxy are
not taken into account when trying to upload a function package to the
server? I have tried from behind a proxy with that proxy set to active
in gretl's settings and got some kind of garbled html message in return.
When I went online directly, bypassing the proxy and de-activating it in
gretl, it worked.
we (Allin and I) have talked about a closely related issue last week
(offline), but here's a variant that really seems to fulfill the bug
When I want to create a new function package in the GUI and I'm not
connected to the internet, then upon trying to save the package
(locally) gretl asks me to specify a tag first. But because I'm offline
gretl doesn't show the tag dropdown lists in the package creation
window. (The latter behavior is the thing we already talked about.) So
it's impossible to save the package. When instead I select "write a spec
file" gretls asks me to save the package first...
I guess the natural solution would be that gretl ships with a tag list
that is current at release, just like it comes with a version of the
manual. In analogy to the pdf manual, if the tag list is not present in
the install location gretl could try to fetch it from the server instead.
there is a trend towards the use of bundles in hansl. And when it comes
to using them for functions or function packages it is nice to use them
in hansl, that is in script format.
However, for GUI-gretl bundles are currently not so nice. I have found
no way to create them somehow from the menus.
And consider the following situation (which is inspired from my attempts
to update the interface of one of my existing packages):
You have been given a function package that takes a bundle as an
argument (for example, to avoid an excessively long list of optional
arguments). If you run that package in the GUI you get the window that
prompts you to specify the argument. But you can only enter an existing
bundle into the argument field. If you have no matching bundle already,
you would have to abort this call and instead go back and pre-specify
the bundle argument with its contents, before you can re-try to run the
Attention, utopian wishlist ahead: It would be optimal if you could
create the bundle on the fly, like you can do with lists of series, or
matrices. Another cool thing would actually be if, when a function in a
package takes a bundle argument, it can somehow communicate which bundle
members it expects; the datatype, which name, etc.
function void bcheck( bundle b[int myparam[0:1:0.5] "which fraction",
where the caller would be expected to pass a bundle, say "bob", with the
members "bob.myparam and bob.data". For the sake of the example I have
also included the gimmicks like default values and explanatory string of
Ok, but the main point is, the GUI interface for the calling of packages
is so cool without bundles, it really is a pity if you have to decide
between that coolness and the use of bundles.
thanks and sorry for the long post,
Am 13.06.2016 um 17:59 schrieb Sven Schreiber:
> Am 09.06.2016 um 16:26 schrieb Sven Schreiber:
>> there are the options --spearman and --kendall for the 'corr' command.
>> (And in the GUI, Model -> Robust estimation -> Rank correlation).
>> How to get the results of these computations, i.e. what is the
>> function-based variant? The corr() function doesn't do this, according
>> to the doc.
> To rephrase the question slightly: Where in the source is the rank
> correlation buried?
Sorry to populate this thread all by myself [and moving to devel]; the
rank correlation seems to reside in lib/src/nonparam.c, ok. There are
two Kendall-related C functions there, one does the actual calculation
and the other one more or less prints the results. Don't know which of
these would need to be hooked up to the hansl corr() function, but I
would be interested to learn how gretl would do this internally.
Dear Allin and Jack,
gretl (current cvs on ubuntu) crashes in the following case:
I defined a string with 8 entries (labeling 8 units) and run the
sprintf insttrs "DIW IFO IFW IMK RWI IWH HWWI GD"
setobs Institut insttrs --panel-groups
where "Institut" is a series of strings labeling a total of 11 units
existing in the dataset. I don't expect this to work, of course.
However, gretl should not crash in this case.
This is not the final Beta version.
I have now updated https://github.com/HelioGuilherme66/gretl
Still missing a README file with proper instructions, but you may already
try with below info:
> Am 28.04.2016 um 18:35 schrieb Hélio Guilherme:
>> As a work in progress we have Regression Tests (Software Development
>> Domain Language ) being set up at
>> There are some missing gretl files (which I hope Allin can provide),
>> there are no missing applications detection, and structure is designed
>> only for Linux.
>> From these 900 gretl test scripts I have only Failing 34 (some due to
>> missing file and missing Stata). There are some minor numeric
>> differences, when comparing the outputs with Allin's provided tests
>> I would like to have more people running the tests, but first would like
>> to have fixed the missing files, and creating a common testing structure
>> to Windows, Mac OS X and Linux.
>> In Linux you will have to do some minor edits:
>> - correct paths in bin/sitevars
>> - edit BASE2 variable in bin/refactor_data
I have installed in my system:
x13as (version limited to 600 data items) (I did not manage to compile) -
command renamed to x12arima.
oxl64 - used GUI to set path
R and required libraries
octave and required libraries
I don't have Stata, and did not yet avoid to run tests requiring it.
(tests are only for Linux, if they work in OS X without modifications,
Maybe the test option could use some flag option like:
test - R - Stata - python
I think that this option would be great in order to see how Gretl behaves
and interacts with other programs on different systems.
Also wouldn't it be much easier if all the datasets used for testing came
On Jun 12, 2016 7:00 PM, <gretl-devel-request(a)lists.wfu.edu> wrote:
> Send Gretl-devel mailing list submissions to
> To subscribe or unsubscribe via the World Wide Web, visit
> or, via email, send a message with subject or body 'help' to
> You can reach the person managing the list at
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Gretl-devel digest..."
> Today's Topics:
> 1. Re: [Gretl-users] About (Unstable regression results)
> (H?lio Guilherme)
> Message: 1
> Date: Sun, 12 Jun 2016 01:41:51 +0100
> From: H?lio Guilherme <helioxentric(a)gmail.com>
> Cc: Gretl development <gretl-devel(a)lists.wfu.edu>
> Subject: Re: [Gretl-devel] [Gretl-users] About (Unstable regression
> Content-Type: text/plain; charset="utf-8"
> Hello All,
> These are the missing data files:
> [helio@localhost test-gretl]$ grep "No such file" diffs
> > /home/cottrell/stats/stata/school.gdt: No such file or directory
> > /home/cottrell/stats/test-gretl/gretl_plant.gdt: No such file or
> > /home/cottrell/stats/hamilton/macrodat.rat.gdt: No such file or directory
> > gpa3.gdt: No such file or directory
> (After that I will skip uninstalled apps testing, like Stata)
> > Failed to execute child process "stata" (No such file or directory)
> On Sat, Jun 11, 2016 at 3:00 PM, Allin Cottrell <cottrell(a)wfu.edu> wrote:
> > On Fri, 10 Jun 2016, Sven Schreiber wrote:
> > [going back to devel with H?lio on cc just in case]
> >> Hi,
> >> whatever happened to this?
> > ["this" being H?lio's github version of my gretl test rig]
> > H?lio, I hope you didn't get the impression that people weren't
> >> interested. I think this test thing is very useful. Personally I just
> >> really understand what the status quo is and what others like myself
> >> or should do with it.
> > I should be able to do something on this over the next few days. H?lio,
> > could you send me a list of the script and/or data files that are missing
> > from the package I supplied? Thanks.
> > Allin
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> Gretl-devel mailing list
> End of Gretl-devel Digest, Vol 113, Issue 9
[going back to devel with Hélio on cc just in case]
whatever happened to this?
Hélio, I hope you didn't get the impression that people weren't
interested. I think this test thing is very useful. Personally I just
don't really understand what the status quo is and what others like
myself could or should do with it.
Am 28.04.2016 um 18:35 schrieb Hélio Guilherme:
> As a work in progress we have Regression Tests (Software Development
> Domain Language ) being set up at
> There are some missing gretl files (which I hope Allin can provide),
> there are no missing applications detection, and structure is designed
> only for Linux.
> From these 900 gretl test scripts I have only Failing 34 (some due to
> missing file and missing Stata). There are some minor numeric
> differences, when comparing the outputs with Allin's provided tests results.
> I would like to have more people running the tests, but first would like
> to have fixed the missing files, and creating a common testing structure
> to Windows, Mac OS X and Linux.
> In Linux you will have to do some minor edits:
> - correct paths in bin/sitevars
> - edit BASE2 variable in bin/refactor_data
> I am posting to the user list, because I suspect that my emails are
> being blocked to devel.
> Best Regards,
> Gretl-users mailing list