[Rd] Improvement of SignRank functions

Ivo Ugrina ivo at iugrina.com
Fri Dec 14 23:03:37 CET 2007


I took some time and liberty and tried to improve
existing implementation of SignRank functions
in R. (dsignrank, ...)

As I have seen they've been based on csignrank.
So I modified csignrank and, I believe,
improved calculation time and memory efficiency.

The idea is basically the same. I use the same recursion
as original author used with one slight modification.
I am generating Wilcoxon SignRank density from the
beginning (for n=2,3,...) with the help of recursion formula.

What is changed?
There is no need for SINGRANK_MAX in src/nmath/nmath.h anymore.
Only functions:
static void w_free()
void signrank_free()
static void w_init_maybe(int n)
static double csignrank(int k, int n)
in src/nmath/signrank.c have been altered.
There was no change to dsignrank, psignrank, ...

I've tried to make as little changes as possible.
So, to compile with new functions only src/nmath/signrank.c
needs to be changed with the one given in attachment.

I hope it really is an improvement.

With respect,
-- 
Ivo Ugrina
ICQ: 47508335 | www.iugrina.com
-------------------------------
baza matematickih pojmova
http://baza.iugrina.com
---------------------------
anime, manga, Japan fanzin
http://yoshi.iugrina.com
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: signrank.c
Url: https://stat.ethz.ch/pipermail/r-devel/attachments/20071214/ab3480ad/attachment.c 


More information about the R-devel mailing list