Learn R Programming

MethComp (version 1.22.2)

corr.measures: Correlation measures for method comparison studies. Please don't use them!

Description

Computes correlation, mean squared difference, concordance correlation coefficient and the association coefficient. middle and ends are useful utilities for illustrating the shortcomings of the association measures, see the example.

Usage

corr.measures(x, y) middle(w, rm = 1/3) ends(w, rm = 1/3)

Arguments

x
vector of measurements by one method.
y
vector of measurements by another method.
w
numerical vector.
rm
fraction of data to remove.

Value

corr.measures return a vector with 4 elements. middle and ends return a logical vector pointing to the middle or the ends of the w after removing a fraction of rm from data.

Details

These measures are all flawed since they are based on the correlation in various guises. They fail to address the relevant problem of AGREEMENT. It is recommended NOT to use them. The example gives an example, illustrating what happens when increasingly large chunks of data in the middle are removed.

References

Shortly...

See Also

MCmcmc.

Examples

Run this code
cbind( zz <- 1:15, middle(zz), ends(zz) )
data( sbp )
bp <- subset( sbp, repl==1 & meth!="J" )
bp <- Meth( bp )
summary( bp )
plot( bp )
bw <- to.wide( bp )
with( bw, corr.measures( R, S ) )
# See how it gets better with less and less data:
summ.corr <-
rbind(
with( subset( bw, middle( R+S, 0.6 ) ), corr.measures( R, S ) ),
with( subset( bw, middle( R+S, 0.4 ) ), corr.measures( R, S ) ),
with(         bw                      , corr.measures( R, S ) ),
with( subset( bw,   ends( R+S, 0.3 ) ), corr.measures( R, S ) ),
with( subset( bw,   ends( R+S, 0.4 ) ), corr.measures( R, S ) ),
with( subset( bw,   ends( R+S, 0.6 ) ), corr.measures( R, S ) ),
with( subset( bw,   ends( R+S, 0.8 ) ), corr.measures( R, S ) ) )
rownames( summ.corr ) <- c("middle 40%",
                           "middle 60%",
                           "total",
                           "outer 70%",
                           "outer 60%",
                           "outer 40%",
                           "outer 20%")
summ.corr
  

Run the code above in your browser using DataLab