mcc {CoreGx} | R Documentation |
The function computes a Matthews correlation coefficient for two factors provided to the function. It assumes each factor is a factor of class labels, and the enteries are paired in order of the vectors.
mcc( x, y, nperm = 1000, nthread = 1, alternative = c("two.sided", "less", "greater"), ... )
x, y |
|
nperm |
|
nthread |
|
alternative |
indicates the alternative hypothesis and must be one of ‘"two.sided"’, ‘"greater"’ or ‘"less"’. You can specify just the initial letter. ‘"greater"’ corresponds to positive association, ‘"less"’ to negative association. |
... |
|
Please note: we recommend you call set.seed() before using this function to ensure the reproducibility of your results. Write down the seed number or save it in a script if you intend to use the results in a publication.
A list with the MCC as the $estimate, and p value as $p.value
x <- factor(c(1,2,1,2,3,1)) y <- factor(c(2,1,1,1,2,2)) mcc(x,y)