[R] normal scores test

Torsten Hothorn Torsten.Hothorn at rzmail.uni-erlangen.de
Mon Mar 8 17:54:43 CET 2004


On Sat, 6 Mar 2004, Padmanabhan, Sudharsha wrote:

>
> Hello,
>
> I need help in performing a Van_der_Waerden normal scores test in R. I
> have two arrays of scores(final on therapy scores from drug and placebo) and
> want to use the normal scores procdeure to test for significance.
> (observations are unequal in number - due to dropouts). Could you please help
> me out with the coding or let me know if there is a package that can be used
> (for example, suppdist etc.)
>


?dperm in package `exactRankTests' has an example:

R> library(exactRankTests)
R>
R> n <- 10
R> x <- rnorm(n)
R> y <- rnorm(n)
R> scores <- cscores(c(x,y), type="NormalQuantile")
R>
R> X <- sum(scores[seq(along=x)])  # <- v.d. Waerden normal quantile statistic
R>
R> # critical value, two-sided test
R>
R> abs(qperm(0.025, scores, length(x), simulate = TRUE, B = 10000))
[1] 3.854136
R>
R> # p-value
R>
R> pperm(X, scores, length(x), alternative="two.sided",
+       simulate = TRUE, B = 10000)
[1] 0.1701

Best,

Torsten

> Thanks in advance
>
> Regards
>
> ~S
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
>




More information about the R-help mailing list