Location tests           package:SpatialNP           R Documentation

_S_p_a_t_i_a_l _s_i_g_n _a_n_d _r_a_n_k _t_e_s_t_s _o_f _m_u_l_t_i_v_a_r_i_a_t_e _l_o_c_a_t_i_o_n

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

     Multivariate tests of location of one or more samples based on
     spatial signs and (signed) ranks. In case of one sample the null
     hypothesis about a given location is tested. In case of several
     samples the null hypothesis is that all samples have the same
     location.

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

      sr.loc.test(X, Y = NULL, g = NULL, score = c("sign", "rank"),
     nullvalue = NULL, cond = FALSE, cond.n = 1000, na.action = na.fail,
     ...)  

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

       X: a matrix or a data frame 

       Y: an optional matrix or a data frame 

       g: a factor giving the groups (may contain just one level) 

   score: a character string indicating which transformation of the
          observations should be used

nullvalue: location to be tested in the one sample case (ignored if
          there is more than one sample)

    cond: logical. Should the conditionally distribution free test be
          used? (Ignored if 'score' is '"rank"')

  cond.n: number of permutations to use in the conditionally
          distribution free test

na.action: a function which indicates what should happen when the data
          contain 'NA's.  Default is to fail.

     ...: further arguments to be passed to other functions

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

     'X' should contain the the whole data set and 'g' should describe
     the groups, or, if there is only one group, 'g' may be missing.
     Alternatively, if there are two samples 'X' may contain only the
     first sample while the second sample is given in 'Y' and 'g' is
     ignored. Note that in the one sample case when 'rank' is chosen as
     'score' the function in fact uses signed ranks.

     Note that the conditionally distribution free p-value is only
     provided for the sign based version of the test.

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

     A list with class 'htest' containing the following components: 

statistic : the value of the statistic

parameter: the degrees of freedom for the statistic or the number of
          replications if conditionally distribution free p-value was
          used

 p.value: the p-value for the test

null.value: the specified hypothesized value of the (common) location

alternative: a character string with the value 'two.sided'.

  method: a character string indicating what type of test was performed

data.name: a character string giving the name of the data (and grouping
          vector)

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

     Seija Sirkia, ssirkia@maths.jyu.fi

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

     Spatial signs and ranks, 'HotellingsT2' for the classical
     Hotelling's T^2 test

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

     A<-matrix(c(1,2,-3,4,3,-2,-1,0,4),ncol=3)
     X<-rbind(matrix(rt(100*3,1),ncol=3),matrix(rt(50*3,1)+1,ncol=3))%*%t(A)
     sr.loc.test(X,cond=TRUE)
     X[1:50,]<-X[1:50,]+1
     g<-factor(rep(c(1,2,3),each=50))
     sr.loc.test(X,g=g,score="rank")

