SpearmanTest              package:coin              R Documentation

_S_p_e_a_r_m_a_n'_s _T_e_s_t _o_n _I_n_d_e_p_e_n_d_e_n_c_e

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

     Testing the independence of two numeric variables.

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

     ## S3 method for class 'formula':
     spearman_test(formula, data, subset = NULL, weights = NULL, ...)
     ## S3 method for class 'IndependenceProblem':
     spearman_test(object,
         alternative = c("two.sided", "less", "greater"),
         distribution = c("asympt", "approx"), ...) 

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

 formula: a formula of the form 'y ~ x | block' where 'y' and 'x' are
          numeric variables and 'block' is an optional factor for
          stratification.

    data: an optional data frame containing the variables in the model
          formula.

  subset: an optional vector specifying a subset of observations to be
          used.

 weights: an optional formula of the form '~ w' defining integer valued
          weights for the observations.

  object: an object of class 'IndependenceProblem'.

alternative: a character, the alternative hypothesis must be one of
          '"two.sided"' (default), '"greater"' or     '"less"'.  You
          can specify just the initial letter.

distribution: a character, the null distribution of the test statistic
          can be approximated by its 'asymptotic' distribution
          ('asympt')  or via Monte-Carlo resampling ('approx').

     ...: further arguments to be passed to or from methods.

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

     The null hypothesis of the independence of 'y' and 'x'  is tested.

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

     An object inheriting from class 'IndependenceTest-class' with
     methods 'show', 'statistic', 'expectation', 'covariance' and
     'pvalue'. The null distribution can be inspected by 'pperm',
     'dperm',   'qperm' and 'support' methods.

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

     spearman_test(CONT ~ INTG, data = USJudgeRatings)

