Correlation {LearnNonparam} | R Documentation |
Test for Association Between Paired Samples
Description
Performs correlation coefficient based two-sample association test on samples.
Super classes
LearnNonparam::PermuTest
-> LearnNonparam::TwoSampleTest
-> LearnNonparam::TwoSamplePairedTest
-> LearnNonparam::TwoSampleAssociationTest
-> Correlation
Methods
Public methods
Inherited methods
Method new()
Create a new Correlation
object.
Usage
Correlation$new( type = c("permu", "asymp"), method = c("pearson", "kendall", "spearman"), alternative = c("two_sided", "less", "greater"), n_permu = 10000 )
Arguments
type
a character string specifying the way to calculate the p-value.
method
a character string specifying the correlation coefficient to be used.
alternative
a character string specifying the alternative hypothesis.
n_permu
an integer indicating number of permutations for the permutation distribution. If set to
0
, all permutations will be used.
Returns
A Correlation
object.
Examples
pmt(
"association.corr", method = "pearson",
alternative = "greater", n_permu = 10000
)$test(Table5.1.2)$print()
t <- pmt(
"association.corr", method = "spearman",
alternative = "two_sided", n_permu = 10000
)$test(Table5.1.2)$print()
t$type <- "asymp"
t
t <- pmt(
"association.corr", method = "kendall",
alternative = "greater", n_permu = 0
)$test(Table5.2.2)$print()
t$type <- "asymp"
t
[Package LearnNonparam version 1.2.9 Index]