Description
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>.
README.md
concordancer
The goal of concordancer is to provide an Rcpp implementation of Lin's Concordance Correlation Coefficient (CCC).
Installation
Install the latest release from CRAN:
install.packages("concordancer")
You can install the development version of concordancer from GitHub with:
# install.packages("devtools")
devtools::install_github("troyjcross/concordancer")
Example
This is a basic example which shows you how to solve a common problem:
library(concordancer)
# Create x and y
x <- rnorm(100, sd = 1)
y <- rnorm(length(x), sd = 0.5)
# Calculate CCC
result <- ccc(x,y)
print(result)