Content Disclaimer Copyright @2020. All Rights Reserved. 
Links : Home Index (Subjects) Contact StatsToDo 
Explanations
Javascript Program
R Codes
D
E
F
The Concordance Correlation Coefficient (Lin, 1989), abbreviated as CCC or ρ_{c}, evaluates the degree to which pairs of observations fall on the 45 degree line (the line of no difference) through the origin of a 2 dimensional plot of the two measurements. Although it can be used to compare any two measuremenets of the same thing, it is particularly suitable to test a measurement against a gold standard.
There are plenty of references easily available (see references), so the rationale and details of calculations will not be repeated here. The wikipedia provides an excellent introduction, and the algorithm and symbols used on this page are based on Chapter 812 of PASS Sample Size Software, both readily accessible on the www.
Data Entry The data is a matrix of 2 columns. Each row represents a case being measured. The two columns, separated by white space, are the paired measurements. If a gold standard is being compared, the gold standard is in the first (left) column. The default example data on this page are generated from the computer and not real. There are only 30 pairs, too few for proper evaluation, but easier to demonstrate in this example. The data are shown in the table to the right. It represents 30 paired measurements of blood pressure. The first column (v1) is the gold standard, intraarterial catheter, and the right (v2) the measurement being compared, external electronic cuffed manometer. Calculations and Results : Please note that the program produces number with 4 decimal places, but 2 decimal places are presented in this discussion for easier reading Step 1 evaluates the basic parameters, in this example sample size n=30 pairs, mean μ_{v1}=120 and μ_{v2}=120.77, Standard Deviations σ_{v1}=9.27 and σ_{v2}=9.34 Step 2 evaluates precisions and accuracies in detail
Step 3 calculates Lin's Coefficient of Concordance and its 95% confidence interval
Interpretation According to McBride (see references)
The one tail lower border is usually used. In this example, the one tail lower border is 0.76, so the immediate interpretation is that the manometer measurement has a poor agreement with the gold standard intraarterial measurement. A more detailed examination shows that the accuracy is high (χ_{a}=0.997), but the precision is low (ρ=0.87). It is the low precision of the manometer measurements that contributed to the poor agreement with the gold standard. Finally, the data are p[lotted against the diagonal line of no difference, as shown in the plot to the right. This allows the users to review the patterns of relationship as well as examining the numerical output.ReferencesLin's Coefficient of Concordance
MacroPlot Code
To Harvest the Bitmap
This panel provides 3 algorithms for calculating Lin's Coefficient of Concordance
dat = (" 127 134 118 120 135 142 123 115 112 117 119 123 125 125 109 111 106 122 110 115 111 109 125 127 119 118 140 139 115 111 110 110 122 122 119 115 134 137 105 105 117 112 111 113 114 115 126 119 113 115 129 127 130 129 130 130 115 120 131 126 ") mx = read.table(textConnection(dat),header=FALSE) n = nrow(mx) y = mx[,1] # col 1 x = mx[,2] # col 2Algorithm 1. Program from CRAN package epiR. Description of the epiR package is in https://cran.rproject.org/web/packages/epiR/epiR.pdf, and the function ccc in page 28. for those intereste, the actual source codes are in https://rdrr.io/cran/epiR/src/R/epi.ccc.R #install.packages("epiR") # if not install already library(epiR) res < epi.ccc(x,y) resThe results are > res $rho.c est lower upper 1 0.8648005 0.7365011 0.9330389 $s.shift [1] 0.9921876 $l.shift [1] 0.08382324 $C.b [1] 0.9964686 $blalt mean delta 1 130.5 7 2 119.0 2 3 138.5 7 4 119.0 8 5 114.5 5 6 121.0 4 7 125.0 0 8 110.0 2 9 114.0 16 10 112.5 5 11 110.0 2 12 126.0 2 13 118.5 1 14 139.5 1 15 113.0 4 16 110.0 0 17 122.0 0 18 117.0 4 19 135.5 3 20 105.0 0 21 114.5 5 22 112.0 2 23 114.5 1 24 122.5 7 25 114.0 2 26 128.0 2 27 129.5 1 28 130.0 0 29 117.5 5 30 128.5 5 $sblalt est delta.sd lower upper 1 0.7666667 4.782752 8.607354 10.14069 $nmissing [1] 0Algorithm 2. Algorithm adapted from PASS. This is the same algorithm as that in the Javascript program on this page, repeated here to check the arithematics # PASS n = nrow(mx) y = mx[,1] # col 1 x = mx[,2] # col 2 print() n = nRow(mx) meanx = mean(x) meany = mean(y) sdx = sd(x) sdy = sd(y) r = cor(x, y, method = "pearson") print(paste("n=",n)) print(paste("mean x=",meanx, " SDx=",sdx)) print(paste("mean y=",meany, " SDy=",sdy)) print(paste("Pearson Correlation Coefficient (Precision, rho)=",r)) w = sdy / sdx; # scale shift v = abs(meanx  meany) / sqrt(sdx * sdy) # effect size chiA = 2 / (v^2 + w + 1/w) # accuracy rc = r * chiA # Lin's coefficient print(paste("Scale Shift omega=",w)) print(paste("Effect Size upsilon=",v)) print(paste("Accuracy chi=",chiA)) print(paste("Lin's Coefficient of Concordance=",rc)) # 95% confidence interval using Fisher's transformation zt = log((1 + rc) / (1  rc)) / 2 a = 1 / (n  2) b = ((1  r^2) * rc^2) / ((1  rc^2) * r^2) c = (2 * rc^3 * (1  rc) * v^2) / (r * (1  rc^2)^2) d = (rc^4 * v^4) / (2 * r^2 * (1  rc^2)^2) varzt = a * (b + c  d) sezt = sqrt(varzt) z = 1.65 # one tail z of p=0.05 uz1 = zt + z * sezt lz1 = zt  z * sezt uc1 = (exp(2 * uz1)  1) / (exp(2 * uz1) + 1) lc1 = (exp(2 * lz1)  1) / (exp(2 * lz1) + 1) print(paste("95% Confidence Interval (1 tail) = >",lc1, " or <", uc1)) z = 1.96; # two tail z of p=0.025 uz2 = zt + z * sezt; lz2 = zt  z * sezt; uc2 = (exp(2 * uz2)  1) / (exp(2 * uz2) + 1) lc2 = (exp(2 * lz2)  1) / (exp(2 * lz2) + 1) print(paste("95% Confidence Interval (2 tail) = <=",lc2, " to ", uc2))The results are [1] "n= 30" [1] "mean x= 120.766666666667 SDx= 9.3391402296938" [1] "mean y= 120 SDy= 9.26617876826889" [1] "Pearson Correlation Coefficient (Precision, rho)= 0.867865264380953" > [1] "Scale Shift omega= 0.992187561206874" [1] "Effect Size upsilon= 0.082414342037823" [1] "Accuracy chi= 0.996584883709398" >[1] "Lin's Coefficient of Concordance= 0.864901403578517" [1] "95% Confidence Interval (1 tail) = > 0.762248991583839 or < 0.925115552803494" [1] "95% Confidence Interval (2 tail) = <= 0.736664402708045 to 0.933096358406987" >Algorithm 3: Calculations according to https://en.wikipedia.org/wiki/Concordance_correlation_coefficient Wikipedia. This is to check that the algorithm as adapted from PASS is the same as that described in the Wikipedia meanx = mean(x) meany = mean(y) sdx = sd(x) sdy = sd(y) r = cor(x, y, method = "pearson") rhoc = (2 * r * sdx * sdy) / (sdx^2 + sdy^2 + (meanx  meany)^2) rhoc # Lin's coefficientThe result is as follows. Pleasr note that it is essentially the same as that from algorithm 1 except for rounding errors rhoc # Lin's coefficient [1] 0.8649014The same results are obtained from all 3 algorithms, except for minor diffrences in rounding errors Plotting x = mx[,1] # col 2 y = mx[,2] # col 1 minx = min(x) maxx = max(x) miny = min(y) maxy = max(y) # Plot Data plot( # Command 1: Draw dots x = x, # x variable = average y = y, # y variable = difference pch = 16, # size of dot xlab = "col 1", # x label ylab = "col 2" # y lable ) lines(x = c(minx, maxx), y=c(miny,maxy)) # Command 2: Draw lineThe result plot is as follows
Contents of D:3
Contents of E:4
Contents of F:5
