spearmanTest | R Documentation |
Providing the confidence interval of Spearman's rank correlation by Bootstrap, and define the specific H0 as per your request, that is based on Fisher's Z transformation of the correlation but with the variance recommended by Bonett and Wright (2000), not the same as Pearson's.
spearmanTest(
x,
y,
h0 = 0,
conf.level = 0.95,
alternative = c("two.sided", "less", "greater"),
nrep = 1000,
rng.seed = NULL,
...
)
x |
( |
y |
( |
h0 |
( |
conf.level |
( |
alternative |
( |
nrep |
( |
rng.seed |
( |
... |
other arguments to be passed to |
a named vector contains correlation coefficient (cor
), confidence
interval(lowerci
and upperci
), Z statistic (Z
) and p-value (pval
)
NCSS correlation document
cor.test()
boot::boot()
to see the detailed arguments.
x <- c(44.4, 45.9, 41.9, 53.3, 44.7, 44.1, 50.7, 45.2, 60.1)
y <- c(2.6, 3.1, 2.5, 5.0, 3.6, 4.0, 5.2, 2.8, 3.8)
spearmanTest(x, y, h0 = 0.5, alternative = "greater")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.