Description Usage Arguments Author(s) References See Also Examples
A plot method for the "PBreg"
class object, that is a
result of Passing-Bablok regression.
1 2 3 4 5 6 7 8 |
x |
an object of class |
pch |
Which plotting character should be used for the points. |
bg |
Background colour for the plotting character. |
xlim |
Limits for the x-axis. |
ylim |
Limits for the y-axis. |
xlab |
Label on the x-axis. |
ylab |
Label on the y-axis. |
subtype |
a numeric value or vector, that selects the desired plot subtype. Subtype 1 is an x-y plot of raw data with regression line and confidence boundaries for the fit as a shaded area. This is the default. Subtype 2 is a ranked residuals plot. Subtype 3 is the "Cusum" plot useful for assessing linearity of the fit. Plot subtypes 1 through 3 are standard plots from the 1983 paper by Passing and Bablok - see the reference. Plot subtype 4 is a histogram (with overlaid density line) of the individual slopes. The range of this plot is limited to 5 x IQR for better visibility. |
colors |
A list of 6 elements allowing customization of colors of various plot elements. For plot subtype 1: "CI" is the color of the shaded confidence interval area; and "fit" is the color of fit line. For plot subtypes 2 & 3: "ref" is the color of the horizontal reference line. For plot subtype 4: "bars" is the bar background color, "dens" is the color of the density line, and "ref2" is a vector of two colors for lines indicating the median and confidence limits. |
... |
other parameters as in |
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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## 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)
## Or the same using "Meth" object
a <- Meth(a, y=1:2)
x <- PBreg(a)
print(x)
par(mfrow=c(2,2))
plot(x, s=1:4)
|
Loading required package: nlme
Passing-Bablok linear regression of y on x
Observations read: 30, used: 30
Slopes calculated: 435, offset: 29
Estimate 2.5%CI 97.5%CI
Intercept -0.5664553 -2.8516891 1.277954
Slope 0.9831395 0.7948791 1.308227
Unadjusted summary of slopes:
Min. 1st Qu. Median Mean 3rd Qu. Max.
-56.7486 0.4679 0.9239 3.4681 1.4893 1077.7566
Summary of residuals:
Min. 1st Qu. Median Mean 3rd Qu. Max.
-10.2957 -1.9124 0.0000 0.5854 4.1432 10.9873
Test for linearity: (passed)
Linearity test not fully implemented in this version.
The following variables from the dataframe
"a" are used as the Meth variables:
y: x y
#Replicates
Method 1 #Items #Obs: 60 Values: min med max
x 30 30 30 1.466140 15.79530 29.90449
y 30 30 30 1.858824 16.54855 28.85836
Passing-Bablok linear regression of y on x
Observations read: 30, used: 30
Slopes calculated: 435, offset: 29
Estimate 2.5%CI 97.5%CI
Intercept -0.5664553 -2.8516891 1.277954
Slope 0.9831395 0.7948791 1.308227
Unadjusted summary of slopes:
Min. 1st Qu. Median Mean 3rd Qu. Max.
-56.7486 0.4679 0.9239 3.4681 1.4893 1077.7566
Summary of residuals:
Min. 1st Qu. Median Mean 3rd Qu. Max.
-10.2957 -1.9124 0.0000 0.5854 4.1432 10.9873
Test for linearity: (passed)
Linearity test not fully implemented in this version.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.