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, 6 months
Preserve row and col names of a matrix after functions
by Henrique Andrade
Dear Gretl Team,
Is it possible to preserve row and col names of a matrix after
"mreverse" and "trimr" functions? Please take a look at the following
code:
<hansl>
matrix M = {1, 2; 2, 1; 4, 1}
strings Row = defarray("Row1", "Row2", "Row3")
strings Col = defarray("Col1", "Col2")
rownames(M, Row)
colnames(M, Col)
matrix Msortby = msortby(M, 1)
matrix Mreverse = mreverse(M)
matrix Mtrimr = trimr(M, 1, 1)
print M Msortby Mreverse Mtrimr
</hansl>
In my humble opinion, "reverse" and "trimr" could have the same
behavior of "msortby", i.e., keep col and row names as in "msortby".
Best,
Henrique Andrade
8 years, 1 month
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
cannot delete (private) function from package
by Sven Schreiber
Hi,
I'm trying to edit one of my locally stored function packages. In
particular I click the button "Add/remove functions" in the edit window,
I get the next window with the function lists, and I remove (by clicking
the red arrow) one of the private helper functions, then click OK. This
action has no effect AFAICS.
The save gfn option under the save button is greyed out, as if I hadn't
changed anything.
This is with a fairly recent snapshot on Windows.
thanks,
sven
8 years, 3 months
some problems with my own translation of Gretl
by oleg_komashko@ukr.net
Dear all,
1) I have tried Ukrainian version on different versions of Windows (XP, 7) - OK,
kubuntu 15.04 - OK, but on ubuntu it goes english after switching
the language to Ukrainian
Currently I do not know whether it is my peculiar ubuntu options,
problems with Ukrainian locale, or Gretl
2) Converting model tables into LaTex lacks packages for cyryllic fonts:
pdf previev doesn't work, TexStudio points on errors whike building
A possible by-hands solutions (I do not know whether it is a good one):
Original 3 top lines:
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[a4paper,pdftex]{geometry}
.....
A working variant:
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T2A]{fontenc} ################<-
\usepackage[a4paper,pdftex]{geometry}
Oleh
8 years, 3 months
Re: [Gretl-devel] MWU package group (Re: Proposal for function package cleanup)
by Sven Schreiber
Hi Yi-Nung,
this is now one year overdue. (I had forgotten about it in the meantime,
and just now stumbled again over the three MWU/mwu/mwu_dummy packages on
the server.)
To workaround the problem that I would forget again, I am now going to
move the "MWU" (uppercase) and "mwu_dummy" packages to the staging area,
so they won't be accessible from within gretl anymore. They will still
be online for some time at:
http://ricardo.ecn.wfu.edu/gretl/staging_fnfiles/
You can consolidate these two removed packages into the "mwu"
(lowercase) package with a new version number and upload the
consolidated version.
Thanks,
sven
Am 13.07.2015 um 02:48 schrieb yinung at Gmail:
> sven, I will integrate those three into one. Please reserve "mwu" for
> these Mann-Whitney test.
> Thanks.
>
> Yi-Nung
>
> 2015-07-13 4:32 GMT+08:00 Sven Schreiber <svetosch(a)gmx.net
> <mailto:svetosch@gmx.net>>:
>
> Am 18.06.2015 um 09:20 schrieb Sven Schreiber:
>
> >>
> >> 8) MWU / mwu / mwu_dummy (Yang): Yi-Nung, please consolidate
> these very
> >> similar things into one package with different options. Please
> respond
> >> to this message, otherwise I propose to remove two of these three
> packages.
> >
> > still waiting for this one
> >
>
> No news here.
>
> Yi-Nung, are there any plans on how to consolidate these three packages?
>
> My "threat" (removing two of three) still stands... But I'm open for
> arguments or deadline extensions, if there are plans and / or good
> reasons.
>
> thanks,
> sven
>
>
8 years, 3 months
Error when accessing array in a bundle
by Sven Schreiber
Hi,
I'm torturing gretl again, example:
<hansl>
strings as = defarray("hu")
matrix ixes = {1}
eval as[ixes[1]]
bundle bb
strings bb.as = as
eval bb.as[ixes[1]] # gives error
</hansl>
Or is this expression somehow ambiguous?
thanks,
sven
8 years, 3 months
how to avoid unintentional rewriting series?
by oleg_komashko@ukr.net
Dear all,
Gretl have several possibilities for creating
of large numbers of new variables with autonames:
square(list)/ square list
list^list
dummify(discreteVar)
etc.
Below is the script to illustrate the problem
open denmark.gdt
sq_LRM = IBO/IDE
# Descriptive label-> IBO/IDE
square LRM
# Descriptive label-> = LRM squared
series LRY_LRM = IBO
# Descriptive label-> IBO
list x = LRY LRM
square(x,1)
# Descriptive label of LRY_LRM -> LRY times LRM
With denmark.gdt everything is obvious
But what if we work with a large data set
with hundreds of variables and hundreds of
new dummies and interactions some replacements
can be easily overlooked
I think there should be some tools to prevent
casual rewriting variables
May be a precheck function to find possible name
duplicating or rename() to rename variables having
underscore in names: this will prevent duplicating,
since all autonames contain '_'
I'll be glad for opinions
Oleh
8 years, 3 months
(no subject)
by Olasehinde Timmy
Please.. Should we be expecting MIDAS on gretl. I will be glad if my
question can be answered. Thanks.
8 years, 3 months