PBreg {MethComp} | R Documentation |
Passing-Bablok regression
Description
Implementation of the Passing-Bablok's procedure for assessing of the equality of measurements by two different analytical methods.
Usage
PBreg(x, y = NULL, conf.level = 0.05, wh.meth = 1:2)
Arguments
x |
a |
y |
a numeric vector of measurements by method B - must be of the same
length as |
conf.level |
confidence level for calculation of confidence boundaries - 0.05 is the default. |
wh.meth |
Which of the methods from the |
Details
This is an implementation of the original Passing-Bablok procedure of fitting unbiased linear regression line to data in the method comparison studies. It calcualtes the unbiased slope and intercept, along with their confidence intervals. However, the tests for linearity is not yet fully implemented.
It doesn't matter which results are assigned to "Method A" and "Method B",
however the "Method A" results will be plotted on the x-axis by the
plot
method.
Value
PBreg
returns an object of class "PBreg"
, for which
the print
, predict
and plot
methods are defined.
An object of class "PBreg"
is a list composed of the following
elements:
coefficients |
a matrix of 3 columns and 2 rows, containing the estimates of the intercept and slope, along with their confidence boundaries. |
residuals |
defined as in the |
fitted.values |
the fitted values. |
model |
the model data frame used. |
n |
a vector of two values: the number of observations read, and the number of observations used. |
S |
A vector of all slope estimates. |
I |
A vector of all intercept estimates. |
adj |
A vector of fit parameters, where Ss
is the number of estimated slopes ( |
cusum |
A vector of cumulative sums of residuals sorted by the D-rank. |
Di |
A vector of D-ranks. |
Note
Please note that this method can become very computationally intensive for larger numbers of observations. One can expect a reasonable computation times for datasets with fewer than 100 observations.
Author(s)
Michal J. Figurski mfigrs@gmail.com
References
Passing, H. and Bablok, W. (1983), A New Biometrical Procedure for Testing the Equality of Measurements from Two Different Analytical Methods. Journal of Clinical Chemistry and Clinical Biochemistry, Vol 21, 709–720
See Also
plot.PBreg, predict.PBreg, Deming
.
Examples
## Model data frame generation
a <- data.frame(x=seq(1, 30)+rnorm(mean=0, sd=1, n=30),
y=seq(1, 30)*rnorm(mean=1, sd=0.4, n=30))
## Call to PBreg
x <- PBreg(a)
print(x)
par(mfrow=c(2,2))
plot(x, s=1:4)
## A real data example
data(milk)
milk <- Meth(milk)
summary(milk)
PBmilk <- PBreg(milk)
par(mfrow=c(2,2))
plot(PBmilk, s=1:4)