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,")"))
     }

