Description Usage Arguments Details Value Note Author(s) References See Also Examples
Implementation of the Passing-Bablok's procedure for assessing of the equality of measurements by two different analytical methods.
1 2 3 |
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 |
... |
other parameters, currently ignored. |
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.
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. |
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.
Michal J. Figurski mfigrs@gmail.com
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
plot.PBreg, predict.PBreg, Deming
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## 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)
|
Loading required package: nlme
Passing-Bablok linear regression of y on x
Observations read: 30, used: 30
Slopes calculated: 435, offset: 37
Estimate 2.5%CI 97.5%CI
Intercept -3.555074 -7.479317 -0.8822109
Slope 1.101764 0.886091 1.3938491
Unadjusted summary of slopes:
Min. 1st Qu. Median Mean 3rd Qu. Max.
-72.0838 0.3906 0.9541 0.9901 1.4931 84.6545
Summary of residuals:
Min. 1st Qu. Median Mean 3rd Qu. Max.
-12.4942 -2.6070 0.0000 0.6811 3.8141 16.1199
Test for linearity: (passed)
Linearity test not fully implemented in this version.
The following variables from the dataframe
"milk" are used as the Meth variables:
meth: meth
item: item
y: y
#Replicates
Method 1 #Items #Obs: 90 Values: min med max
Gerber 45 45 45 0.85 2.67 6.20
Trig 45 45 45 0.96 2.67 6.21
#Replicates
Method 1 #Items #Obs: 90 Values: min med max
Gerber 45 45 45 0.85 2.67 6.20
Trig 45 45 45 0.96 2.67 6.21
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.