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, 4 months
another ternary woe
by Sven Schreiber
Hi,
very short minimal script here:
<hansl>
matrix heyho = ("a" == "b") ? garbl[3,] : I(2)
</hansl>
There is no object "garbl", but that's by design in the case that the
condition isn't true. Gretl says "[" would be invalid here.
thanks,
sven
7 years, 6 months
new defbundle() function
by Allin Cottrell
Since we already have defarray() and deflist() -- the latter in
fairly recent git; see
http://lists.wfu.edu/pipermail/gretl-devel/2017-April/007580.html
it seemed like time to have a defbundle() function. It's now in git,
and documented in the online Function Reference. Saves you having to
declare a bundle as "null" then add one member at a time. Example:
bundle b = defbundle("x", 5, "mat", I(3), "str", "Some string")
The (zero or more) arguments have to come in pairs of (string) key
followed by an expression that evaluates to an object of a type that
can be included in a bundle. Type coercion is not supported; if you
want to do that you have to use the traditional method of adding an
object to a (pre-declared) bundle, as in
series b.s5 = 5
Allin
7 years, 6 months
Re: [Gretl-devel] Gretl-devel Digest, Vol 123, Issue 23
by Clive Nicholas
>
> I can't reproduce this error, but it may have something to do with the
> parallel build: perhaps our Makefiles are missing an explicit
> dependency ordering.
>
> Could you try doing:
>
> rm -f doc/commands/functex doc/commands/cmdtex
>
> then "make ; make pdfdocs" (without the -j flag).
>
> Allin
>
*That sorted it, and my copy of -gretl- 2017b-git is now running, with PDF
viewer successfully switched to xreader. *
*My TeXLive 2016 installation log (from one of Purdue's servers last week)
shows no package entry for -functex-, so that may have something to do it.
Or it may have been, as you suggest, missing some other dependency.*
*Either way, many grateful thanks for your quick help and for zoning in so
quickly on the issue.*
*C*
> ------------------------------
>
> _______________________________________________
> Gretl-devel mailing list
> Gretl-devel(a)lists.wfu.edu
> http://lists.wfu.edu/mailman/listinfo/gretl-devel
>
> End of Gretl-devel Digest, Vol 123, Issue 23
> ********************************************
>
--
Clive Nicholas
"My colleagues in the social sciences talk a great deal about methodology.
I prefer to call it style." -- Freeman J. Dyson
7 years, 6 months
Functex fatal error at -make- stage
by Clive Nicholas
Linux Mint 18.1, TeXLive 2016, R 3.4.0,
I'm stumbling on a make error when building my install for gretl-:
sudo apt-get install texlive-latex-extra texlive-fonts-recommended
texlive-fonts-extra git # OK
git clone git://git.code.sf.net/p/gretl/git gretl-git # OK
cd gretl-git # OK
sudo apt-get build-dep gretl # OK
./configure --prefix=/usr/local --enable-quiet-build --enable-openmp
--enable-build-doc --disable-json # OK
make -j3 # OK in general, but functex error first appears here
make pdfdocs
[...]
** Error: no phrase with key = 'chap:criteria' found.'
./xsltrans: input file 'ftex.xml'; err = 0
./reflow: short input byte-count 536
Makefile:295: recipe for target 'functex' failed
make[3]: *** [functex] Error 1
make[3]: Leaving directory '/home/clive/gretl-git/doc/commands'
Makefile:230: recipe for target 'functex' failed
make[2]: *** [functex] Error 2
make[2]: Leaving directory '/home/clive/gretl-git/doc/tex'
Makefile:11: recipe for target 'tex' failed
make[1]: *** [tex] Error 2
make[1]: Leaving directory '/home/clive/gretl-git/doc'
Makefile:68: recipe for target 'pdfdocs' failed
make: *** [pdfdocs] Error 2
I ran the call to -make pdfdocs- x 3, but it won't budge. Never quite had
this problem before.
I installed -gretl- successfully on Linux Mint 18 "Sarah" with exactly the
same commands, but not now under "Serena". Not quite so serene for me,
clearly!
Yours with thanks,
Clive Nicholas
--
Clive Nicholas
"My colleagues in the social sciences talk a great deal about methodology.
I prefer to call it style." -- Freeman J. Dyson
7 years, 6 months
re-reading of edited scripts with include
by Sven Schreiber
Hi,
could it be (Apr 11th snapshot) that gretl isn't always
re-reading/re-loading functions from included scripts that have been edited?
I got a (correct) error message about 'N' being undefined, then I
inserted a definition for N (in the external function/script), but I
still get the same error message. I made sure to set my working
directory to the one where these scripts all live.
BTW, I also noticed that in this case gretl didn't spit out the nested
hierarchy of functions called before getting to the error, as it usually
(sometimes?) does.
thanks,
sven
7 years, 6 months
Height of some dialog windows
by Sven Schreiber
Hi,
I've just noticed with the example of the ARIMA-specification dialog
that it doesn't fit on my laptop screen from top to bottom. (It's a
12-inch 16:10 ratio screen I think, at standard/native resolution.) And
there isn't any kind of scrollbar.
Any medium-term solution for this interface issue? (Perhaps also with
other windows.)
thanks,
sven
7 years, 6 months
bug with ternary statement and list
by Sven Schreiber
Hi,
voilà:
<hansl>
nulldata 10
series x = normal()
big = 1
list hey = big ? x : x y # works
list hey = big ? x : x y z # "UNDEF" error
</hansl>
This is with 2017a on Windows.
thanks,
sven
7 years, 6 months
manipulating empty matrices
by Sven Schreiber
Hi,
not sure if at some earlier stage an error should be thrown:
<hansl>
matrix m1 = {}
eval m1' # gives "empty matrix"
eval mshape(m1, 2, 3) # gives "NULL matrix"
eval transp( mshape(m1, 2, 3) ) # gives syntax error
</hansl>
In particular, perhaps mshape() should be illegal on an empty matrix. Or
alternatively, perhaps it should be filled with NAs. Finally, a luxury
request would be to have a more specific error message in the final line.
thanks,
sven
7 years, 6 months
genseries() extension to lists?
by Sven Schreiber
Hi,
first, many thanks for the new release with all the effort involved.
Next, great time for feature requests, hehe... I thought it would be
nice if genseries() could be overloaded to accept an array of strings
instead of a single string, and a list or matrix of corresponding
dimensions, to produce several series in one go, avoiding the need for a
loop.
(The return type then would be a vector of IDs I guess, instead of a
scalar.)
cheers,
sven
7 years, 6 months