## S3 method for class 'formula':
spearman_test(formula, data, subset = NULL, weights = NULL, \dots)
## S3 method for class 'IndependenceProblem':
spearman_test(object, distribution = c("asymptotic", "approximate", "none"), ...)## S3 method for class 'formula':
fisyat_test(formula, data, subset = NULL, weights = NULL, \dots)
## S3 method for class 'IndependenceProblem':
fisyat_test(object, distribution = c("asymptotic", "approximate", "none"),
ties.method = c("mid-ranks", "average-scores"), ...)
## S3 method for class 'formula':
quadrant_test(formula, data, subset = NULL, weights = NULL, \dots)
## S3 method for class 'IndependenceProblem':
quadrant_test(object, distribution = c("asymptotic", "approximate", "none"),
mid.score = c("0", "0.5", "1"), ...)
## S3 method for class 'formula':
koziol_test(formula, data, subset = NULL, weights = NULL, \dots)
## S3 method for class 'IndependenceProblem':
koziol_test(object, distribution = c("asymptotic", "approximate", "none"),
ties.method = c("mid-ranks", "average-scores"), ...)
y ~ x | block
where y
and x
are
numeric variables and block
is an optional factor for stratification.NULL
.~ w
defining integer valued case
weights for each observation. Defaults to NULL
, implying equal
weight for all observations."IndependenceProblem "
."asymptotic"
, default)
or via Monte Carlo resampling ("approximate"
). Alternatively, the
functi"mid-ranks"
, default) or averages the scores
of randomly broken ties ("average-scores"
)."0"
, default), 0.5 ("0.5"
) or 1 ("1"
); see
median_test
.independence_test
."IndependenceTest "
.spearman_test
, fisyat_test
, quadrant_test
and
koziol_test
provide the Spearman correlation test, the Fisher-Yates
correlation test using van der Waerden scores, the quadrant test and the
Koziol-Nemec test. A general description of these methods is given by
The null hypothesis of independence, or conditional independence given
block
, between y
and x
is tested.
The conditional null distribution of the test statistic is used to obtain
$p$-values and an asymptotic approximation of the exact distribution is
used by default (distribution = "asymptotic"
). Alternatively, the
distribution can be approximated via Monte Carlo resampling by setting
distribution
to "approximate"
. See asymptotic
and
approximate
for details.
Koziol, J. A. and Nemec, A. F. (1979). On a
## Asymptotic Spearman test
spearman_test(CONT ~ INTG, data = USJudgeRatings)
## Asymptotic Fisher-Yates test
fisyat_test(CONT ~ INTG, data = USJudgeRatings)
## Asymptotic quadrant test
quadrant_test(CONT ~ INTG, data = USJudgeRatings)
## Asymptotic Koziol-Nemec test
koziol_test(CONT ~ INTG, data = USJudgeRatings)
Run the code above in your browser using DataLab