\(\frac{2\rho \sigma_x \sigma_y}{(\mu_x - \mu_y)^2 + \sigma_x^2 + \sigma_y^2}\)
\(\rho\) = correlation coefficient between variables x and y;
\(\sigma_x^2\) = variance of x;
\(\sigma_y^2\) = variance of y;
\(\mu_x\) = mean of x;
\(\mu_y\) = mean of y;
library("epiR")
## Loading required package: survival
## Package epiR 1.0-15 is loaded
## Type help(epi.about) for summary information
## Type browseVignettes(package = 'epiR') to learn how to use epiR for applied epidemiological analyses
##
set.seed(seed = 1234)
method1 <- rnorm(n = 25, mean = 0, sd = 1)
method2 <- method1 + runif(n = 25, min = -0.5, max = 0.5)
tmp <- data.frame(method1, method2)
head(tmp)
## method1 method2
## 1 -1.2070657 -1.63328587
## 2 0.2774292 0.08711584
## 3 1.0844412 1.30171292
## 4 -2.3456977 -2.34115179
## 5 0.4291247 0.08212365
## 6 0.5060559 0.50998938
Apply z-transformation, compute 95% confidence interval, CCC = 0.9461401, 95% confidence interval (0.8857455,0.9750329)
tmp.ccc <- epi.ccc(method1, method2, ci = "z-transform", conf.level = 0.95,
rep.measure = FALSE)
tmp.ccc
## $rho.c
## est lower upper
## 1 0.9461401 0.8857455 0.9750329
##
## $s.shift
## [1] 1.08911
##
## $l.shift
## [1] -0.1038458
##
## $C.b
## [1] 0.9910435
##
## $blalt
## mean delta
## 1 -1.420175809 0.426220120
## 2 0.182272543 0.190313398
## 3 1.193077048 -0.217271743
## 4 -2.343424747 -0.004545912
## 5 0.255624168 0.347001041
## 6 0.508022636 -0.003933488
## 7 -0.577759499 0.006039077
## 8 -0.421031757 -0.251200197
## 9 -0.727127087 0.325350176
## 10 -0.715841624 -0.348392410
## 11 -0.294775784 -0.364833832
## 12 -1.227457807 0.458142725
## 13 -0.867662817 0.182817845
## 14 -0.178666213 0.486250061
## 15 0.829006922 0.260974273
## 16 -0.007038186 -0.206494617
## 17 -0.606962127 0.191905243
## 18 -0.906921634 -0.008547566
## 19 -1.061348371 0.448353381
## 20 2.448120098 -0.064569840
## 21 -0.055171686 0.378519813
## 22 -0.294267706 -0.392836382
## 23 -0.683234244 0.485372744
## 24 0.601149993 -0.283121104
## 25 -0.898739580 0.410038667
##
## $sblalt
## est delta.sd lower upper
## 1 0.09806206 0.3015703 -0.4930049 0.689129
##
## $nmissing
## [1] 0
Altman DG (1991) Practical statistics for medical research. London: Chapman and Hall.
Lin L.I-K (1989) A [CCC] to evaluate reproducibility. Biometrics 45:255-268
McBride GB (2005) A proposal for strength-of-agreement criteria for Lin’s concordance… NIWA Client Report: HAM2005-062.
Lin L (2000). A note on the concordance correlation coefficient. Biometrics 56: 324 – 325.