cscores            package:exactRankTests            R Documentation

_C_o_m_p_u_t_a_t_i_o_n _o_f _S_c_o_r_e_s

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

     This function can be used to compute several scores for a data
     vector.

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

     ## Default S3 method:
     cscores(y, type=c("Data", "Wilcoxon", "NormalQuantile", 
             "AnsariBradley", "Median", "Savage", "ConSal"), int=FALSE,
             maxs=length(y), ... )
     ## S3 method for class 'factor':
     cscores(y, ...)
     ## S3 method for class 'Surv':
     cscores(y, type="LogRank", int=FALSE, maxs=nrow(y), ...)

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

       y: a numeric, factor or logical vector or an object of class
          'Surv'. 

    type: a character string which specifies the type of the scores to
          be computed. 'Data' just returns 'y' if  'y' is numeric.

     int: a logical, forcing integer valued scores. 

    maxs: an integer defining the maximal value of the scores if
          'int=TRUE'.

     ...: additional arguments, not passed to anything at the moment. 

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

     This function will serve as the basis for a  more general
     framework of rank and permutation tests in future versions of this
     package. Currently, it is only used in the examples.

     The logrank scores are computed as given in Hothorn & Lausen
     (2002).

     If integer valued scores are requested ('int = TRUE'), the
     'scores' are mapped into integers by
     'round(scores*length(scores)/max(scores))'. See 'dperm' for more
     details.

     'type' is self descriptive, except for 'ConSal' which implements
     scores suggested by Conover & Salsburg (1988).

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

     A vector of scores for 'y' with an attribute 'scores' indicating
     the kind of scores used is returned.

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

     Torsten Hothorn <Torsten.Hothorn@rzmail.uni-erlangen.de>

_R_e_f_e_r_e_n_c_e_s:

     Torsten Hothorn & Berthold Lausen (2002), On the exact
     distribution of maximally selected rank statistics. _Computational
     Statistics & Data Analysis_, (in press). Preprint available from
     <URL:
     http://www.mathpreprints.com/math/Preprint/hothorn/20020227/2>

     William J. Conover & David S. Salsburg (1988), Locally most
     powerful tests for detecting treatment effects when only a subset
     of patients can be expected to "respond" to treatment.
     _Biometrics_, *44*, 189-196.

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

     y <- rnorm(50)
     # v.d. Waerden scores
     nq <- cscores(y, type="Normal", int=TRUE)
     # quantile for m=20 observations in the first group
     qperm(0.1, nq, 20)

