Calculate de Concordance correlation coefficient Lin with R



Hi my name is Kike, I need to calculate the Calculate de Concordance correlation coefficient Lin with R.I have two variables with continuous data and the data has passed the homology test. I found two libraries to do these correlation tests but the RStudio program does not recognize me. someone can give me a hand.

tmp.ccc <- CCC(metodo_GS_DXC, metodo_GC_Caresens, ci = "z-transform",
   conf.level = 0.95)"
Error in CCC(metodo_GS_DXC, metodo_GC_Caresens, ci = "z-transform", conf.level = 0.95) : 
  no se pudo encontrar la función "CCC"

I have to calculate the concordance, accuracy and sensitivity of two measurements with two different equipment and know which is more accurate, its concordance and accuracy. I have been told that with Lin's test I would serve.


So It looks like you are installing the packages but not actually loading them into your R session. Try adding:


above your CCC() function call line


thanks, I do your recommendation and i attach the two library but the program said me this

The downloaded binary packages are in
package ‘epiR’ was built under R version 3.4.4Loading required package: survival
package ‘survival’ was built under R version 3.4.4Package epiR 0.9-97 is loaded
Type help(epi.about) for summary information

package ‘DescTools’ was built under R version 3.4.4
Attaching package: ‘DescTools’

The following objects are masked from ‘package:psych’:

    AUC, ICC, SD

The following object is masked from ‘package:genefilter’:



Those are all normal messages generated during the package loading process, and they don't necessarily mean anything is wrong.

This message shows up when you've installed packages built under a different version of R than the one you are currently running. It comes up most frequently when you are running a version of R that is older than the current version. It doesn't usually cause problems if the versions aren't too different. The best way to resolve the warning (assuming you are running on older version of R) is usually to update R and then re-install the packages.

R searches for functions in loaded packages based on the order in which they were loaded, with more recently loaded packages being searched first. Therefore, if two packages have functions with the same names, R will warn you that the more recently loaded one is "masking" access to the functions in the one loaded earlier. So here, both DescTools and psych have functions called AUC(), ICC(), and SD(), and since you loaded DescTools later, the DescTools versions will take precedence. If you want to use the psych functions with those names, you can either load psych after DescTools, or you can just use explicit namespace prefixes in your code, e.g. psych::AUC() to access the function named AUC() from the psych package.