mc.paba.LargeData {mcr}R Documentation

Passing-Bablok Regression for Large Datasets

Description

This function represents an interface to a fast C-implementation of an adaption of the Passing-Bablok algorithm for large datasets. Instead of building the complete matrix of pair-wise slope values, a pre-defined binning of slope-values is used (Default NBins=1e06). This reduces the required memory dramatically and speeds up the computation.

Usage

mc.paba.LargeData(
  X,
  Y,
  NBins = 1e+06,
  alpha = 0.05,
  posCor = TRUE,
  calcCI = TRUE,
  slope.measure = c("radian", "tangent")
)

Arguments

X

(numeric) vector containing measurement values of reference method

Y

(numeric) vector containing measurement values of test method

NBins

(integer) value specifying the number of bins used to classify slope-values

alpha

(numeric) value specifying the 100(1-alpha)% confidence level for confidence intervals

posCor

(logical) should algorithm assume positive correlation, i.e. symmetry around slope 1?

calcCI

(logical) should confidence intervals be computed?

slope.measure

angular measure of pairwise slopes (see mcreg for details).
"radian" - for data sets with even sample numbers median slope is calculated as average of two central slope angles.
"tangent" - for data sets with even sample numbers median slope is calculated as average of two central slopes (tan(angle)).

Value

Matrix of estimates and confidence intervals for intercept and slope. No standard errors provided by this algorithm.

Author(s)

Andre Schuetzenmeister andre.schuetzenmeister@roche.com (partly re-using code of function 'mc.paba')

Examples


 library("mcr")
 data(creatinine,package="mcr")
 
# remove any NAs
crea <- na.omit(creatinine)
    
# call the approximative Passing-Bablok algorithm (Default NBins=1e06)
res1 <- mcreg(x=crea[,1], y=crea[,2], method.reg="PaBaLarge", method.ci="analytical") 
getCoefficients(res1)

# now increase the number of bins and see whether this makes a difference
res2 <- mcreg(x=crea[,1], y=crea[,2], method.reg="PaBaLarge", method.ci="analytical", NBins=1e07) 
getCoefficients(res2)
getCoefficients(res1)-getCoefficients(res2)

[Package mcr version 1.3.3 Index]