mcc: Compute a Mathews Correlation Coefficient

Description Usage Arguments Value Examples

View source: R/MatthewCor.R

Description

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.

Usage

1
mcc(x, y, nperm = 1000, setseed = 12345, nthread = 1)

Arguments

x, y

factor of the same length with the same number of levels

nperm

number of permutations for significance estimation. If 0, no permutation testing is done

setseed

seed for permutation testing

nthread

can parallelize permutation texting using parallel's mclapply

Value

A list with the MCC as the $estimate, and p value as $p.value

Examples

1
2
3
x <- factor(c(1,2,1,2,3,1))
y <- factor(c(2,1,1,1,2,2))
mcc(x,y)

CoreGx documentation built on Dec. 20, 2019, 1:08 a.m.

Related to mcc in CoreGx...