dNormScore(x, c, N, U, log=FALSE)
pNormScore(q, c, N, U, lower.tail=TRUE, log.p=FALSE)
qNormScore(p, c, N, U, lower.tail=TRUE, log.p=FALSE)
rNormScore(n, c, N, U)
sNormScore(c, N, U)
normOrder(N)
dNormScore()
gives the density, pNormScore()
the distribution function and qNormScore()
its inverse. rNormScore()
generates random numbers. sNormScore()
produces a list containing parameters corresponding to the arguments -- mean, median, mode, variance, sd, third cental moment, fourth central moment, Pearson's skewness, skewness, and kurtosis. normOrder()
gives the expected values of the normal order statistics for a sample of size N.Let $e_N(k)$ be the expected value of the $k_{th}$ smallest observation in a sample of N independent normal variates. Rank all observations together, and let $R_{ij}$ denote the rank of observation $X_{ij}$, $i=1 \dots n_j$ for treatment $j=1 \dots c$, then the normal scores test statistic is
$$x=(N-1)\frac{1}{\sum_{k=1}^{N} e_N(k)^2} \sum_{j=1}^{c}\frac{S_j^2}{n_j}$$
where $S_j=\sum_{i=1}^{n_j}(e_N(R_{ij}))$.
See Lu and Smith (1979) for a thorough discussion and some exact tables for small r and n. The calculations made here use an incomplete beta approximation -- the same one used for Kruskal-Wallis, only differing in the calculation of the variance of the statistic.
The expected values of the normal order statistics use a modification of M.Maechler's C version of the Fortran algorithm given by Royston (1982). Spot checking the values against Harter (1969) confirms the accuracy to 4 decimal places as claimed by Royston.
Lu, H.T. and Smith, P.J. (1979) Distribution of normal scores statistic for nonparametric one-way analysis of variance. Jour. Am Stat. Assoc. 74. 715-722.
Royston, J.P. (1982). Expected normal order statistics (exact and approximate) AS 177. Applied Statistics. 31. 161-165.
#Assuming three treatments, each with a sample size of 5
pNormScore(2, 3, 15, 0.6)
pNormScore(c(0.11,1.5,5.6), 3, 15, 0.6) ## approximately 5\% 50\% and 95\%
sNormScore(3, 15, 0.6)
plot(function(x)dNormScore(x,c=5, N=15, U=0.6),0,5)
Run the code above in your browser using DataLab