Package 'concordancer'

Title: An 'Rcpp' Implementation of Lin's Concordance Correlation Coefficient (CCC)
Description: Lin's Concordance Correlation Coefficient (CCC) is a statistic which measures the degree of agreement between two variables. The CCC is useful for assessing (i) the measurement agreement between two variables (typically outputs between two devices); (ii) the reproducibility between two measurements obtained from the same device; and (iii) inter-rater reliability. The 'concordancer' package provides a 'C++' implementation of Lin's CCC via 'Rcpp'. In so doing, the ccc() function contained herein is a much faster implementation than those contained in other R packages. For more details on Lin's CCC, please see <https://en.wikipedia.org/wiki/Concordance_correlation_coefficient>.
Authors: Troy J Cross [aut, cre, cph]
Maintainer: Troy J Cross <troy.cross@sydney.edu.au>
License: GPL (>= 3)
Version: 1.0.2
Built: 2024-02-16 07:45:00 UTC
Source: CRAN

Help Index


A short title line describing what the package does

Description

A more detailed description of what the package does. A length of about one to five lines is recommended.

Details

This section should provide a more detailed overview of how to use the package, including the most important functions.

Author(s)

Your Name, email optional.

Maintainer: Your Name <your@email.com>

References

This optional section can contain literature or other references for background information.

See Also

Optional links to other man pages

Examples

## Not run: 
     ## Optional simple examples of the most important functions
     ## These can be in \dontrun{} and \donttest{} blocks.   
  
## End(Not run)

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)