ccc: An Rcpp implementation of Lin's Concordance Correlation...

View source: R/ccc.R

cccR Documentation

An Rcpp implementation of Lin's Concordance Correlation Coefficient (CCC)

Description

This ccc() function leverages the speed of C++ to implement Lin's Concordance Correlation Coefficient (CCC) via Rcpp. This implementation is faster than other varieties of CCC calculation from other packages, i.e., DescTools::CCC() and epiR::epi.ccc().

Usage

ccc(x, y)

Arguments

x

A numeric vector containing x.

y

A numeric vector containing y.

Details

For more details on the calculation of the CCC, see: https://en.wikipedia.org/wiki/Concordance_correlation_coefficient

Value

A numeric scalar representing the CCC between x and y.

Examples

# Create x and y vectors
x <- rnorm(100, sd = 1)
y <- rnorm(length(x), sd = 0.2)

# Calculate CCC between x and y
ccc(x,y)


concordancer documentation built on July 26, 2023, 5:13 p.m.