SignRank                package:stats                R Documentation

_D_i_s_t_r_i_b_u_t_i_o_n _o_f _t_h_e _W_i_l_c_o_x_o_n _S_i_g_n_e_d _R_a_n_k _S_t_a_t_i_s_t_i_c

_D_e_s_c_r_i_p_t_i_o_n:

     Density, distribution function, quantile function and random
     generation for the distribution of the Wilcoxon Signed Rank
     statistic obtained from a sample with size 'n'.

_U_s_a_g_e:

     dsignrank(x, n, log = FALSE)
     psignrank(q, n, lower.tail = TRUE, log.p = FALSE)
     qsignrank(p, n, lower.tail = TRUE, log.p = FALSE)
     rsignrank(nn, n)

_A_r_g_u_m_e_n_t_s:

     x,q: vector of quantiles.

       p: vector of probabilities.

      nn: number of observations. If 'length(nn) > 1', the length is
          taken to be the number required.

       n: number(s) of observations in the sample(s).  A positive
          integer, or a vector of such integers.

log, log.p: logical; if TRUE, probabilities p are given as log(p).

lower.tail: logical; if TRUE (default), probabilities are P[X <= x],
          otherwise, P[X > x].

_D_e_t_a_i_l_s:

     This distribution is obtained as follows.  Let 'x' be a sample of
     size 'n' from a continuous distribution symmetric about the
     origin.  Then the Wilcoxon signed rank statistic is the sum of the
     ranks of the absolute values 'x[i]' for which 'x[i]' is positive. 
     This statistic takes values between 0 and n(n+1)/2, and its mean
     and variance are n(n+1)/4 and n(n+1)(2n+1)/24, respectively.

     If either of the first two arguments is a vector, the recycling
     rule is used to do the calculations for all combinations of the
     two up to the length of the longer vector.

_V_a_l_u_e:

     'dsignrank' gives the density, 'psignrank' gives the distribution
     function, 'qsignrank' gives the quantile function, and 'rsignrank'
     generates random deviates.

_A_u_t_h_o_r(_s):

     Kurt Hornik; efficiency improvement by Ivo Ugrina.

_S_e_e _A_l_s_o:

     'wilcox.test' to calculate the statistic from data, find p values
     and so on.

     'dwilcox' etc, for the distribution of _two-sample_ Wilcoxon rank
     sum statistic.

_E_x_a_m_p_l_e_s:

     require(graphics)

     par(mfrow=c(2,2))
     for(n in c(4:5,10,40)) {
       x <- seq(0, n*(n+1)/2, length=501)
       plot(x, dsignrank(x,n=n), type='l', main=paste("dsignrank(x,n=",n,")"))
     }

