Mann-Kendall test
by Sven Schreiber
Hi,
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
https://cran.r-project.org/web/packages/trend/vignettes/trend.pdf (only
the basic version in section 1.1).
All you have to do is call "MannKendall(x)", where x is your series of
interest.
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.
thanks,
sven
7 years, 7 months
Pre-specifying names of list members returned from a function call
by Sven Schreiber
Hi,
see feature request #85 (by myself I must admit):
https://sourceforge.net/p/gretl/feature-requests/85/
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
encapsulation.
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,
sven
8 years, 2 months
Proxy settings for package upload
by Sven Schreiber
Hi,
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.
thanks,
sven
8 years, 6 months
Tags and offline creation of function packages
by Sven Schreiber
Hi,
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
criterion:
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.
thanks,
sven
8 years, 6 months
Bundles in function packages and their GUI treatment
by Sven Schreiber
Hi,
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
package.
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.
Something like:
<utopian>
function void bcheck( bundle b[int myparam[0:1:0.5] "which fraction",
matrix data])
</utopian>
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
the sub-arguments.
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,
sven
8 years, 6 months
Re: [Gretl-devel] [Gretl-users] Kendall's tau
by Sven Schreiber
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.
thanks,
sven
8 years, 6 months
Crash: Got 8 strings but there are 11 groups
by Artur T.
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
following command
<hansl>
sprintf insttrs "DIW IFO IFW IMK RWI IWH HWWI GD"
setobs Institut insttrs --panel-groups
</hansl>
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.
Best,
Artur
8 years, 6 months
Re: [Gretl-devel] [Gretl-users] About (Unstable regression results)
by Hélio Guilherme
Hi All,
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
>>
>> https://github.com/HelioGuilherme66/gretl/tree/master/gretl-tests/test-gr...
>> .
>>
>> 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 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,
great :))
8 years, 6 months
Re: [Gretl-devel] Gretl-devel Digest, Vol 113, Issue 9
by cociuba mihai
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
with Gretl?
On Jun 12, 2016 7:00 PM, <gretl-devel-request(a)lists.wfu.edu> wrote:
> Send Gretl-devel mailing list submissions to
> gretl-devel(a)lists.wfu.edu
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.wfu.edu/mailman/listinfo/gretl-devel
> or, via email, send a message with subject or body 'help' to
> gretl-devel-request(a)lists.wfu.edu
>
> You can reach the person managing the list at
> gretl-devel-owner(a)lists.wfu.edu
>
> 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
> results)
> Message-ID:
> <
> CABNCgGRaAk_gQv_CCMyYmuwaw_D74YoUhYL3xogE3-C19cFBZQ(a)mail.gmail.com>
> 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
> directory
> > /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
> don't
> >> really understand what the status quo is and what others like myself
> could
> >> 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: <
> http://lists.wfu.edu/pipermail/gretl-devel/attachments/20160612/efb5a523/...
> >
>
> ------------------------------
>
> _______________________________________________
> Gretl-devel mailing list
> Gretl-devel(a)lists.wfu.edu
> http://lists.wfu.edu/mailman/listinfo/gretl-devel
>
> End of Gretl-devel Digest, Vol 113, Issue 9
> *******************************************
>
8 years, 6 months
Re: [Gretl-devel] [Gretl-users] About (Unstable regression results)
by Sven Schreiber
[going back to devel with Hélio on cc just in case]
Hi,
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.
thanks,
sven
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
> https://github.com/HelioGuilherme66/gretl/tree/master/gretl-tests/test-gr....
>
> 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,
> Hélio
>
>
>
>
>
> _______________________________________________
> Gretl-users mailing list
> Gretl-users(a)lists.wfu.edu
> http://lists.wfu.edu/mailman/listinfo/gretl-users
>
8 years, 6 months