rowKappa: Calculate row-wise kappa statistics of a matrix

View source: R/RcppExports.R

rowKappaR Documentation

Calculate row-wise kappa statistics of a matrix

Description

The function returns row-wise kappa statistics of a matrix, using a linear algebra procedure implemented in C++.

Usage

rowKappa(matrix, minOverlap = 0L)

Arguments

matrix

An adjacency matrix, containing values of either 0 or 1.

minOverlap

Integer, minimal overlap between two columns in order to be considered. Pairs with fewer overlaps will return NA.

Value

A matrix of size m \times m if the input matrix is of size m \times n.

Note

A kappa statistics of value 1 indicates perfect agreement. A value of 0 indicates no agreement. Note that the value can be negative, which implies the agreement is worse than random.

See Also

colKappa to calculate the statistic of rows

Other kappa functions: colKappa(), kappaSimp()

Examples

testMat <- cbind(c(1,1,0,0,1,0), c(1,1,0,1,1,0), c(0,1,0,0,1,0), c(1,0,1,0,1,0))
rowKappa(testMat)
stopifnot(identical(rowKappa(testMat), colKappa(t(testMat))))

bedapub/ribiosMath documentation built on Jan. 29, 2023, 1:48 p.m.