
Last chance! 50% off unlimited learning
Sale ends in
Draw different Bland-Altman plot modifications (see parameter plot.type
).
MCResult.plotDifference(
.Object,
xlab = NULL,
ylab = NULL,
ref.line = TRUE,
ref.line.col = "black",
ref.line.lty = 1,
ref.line.lwd = 1,
bias.line.lty = 1,
bias.line.lwd = 1,
bias.line.col = "red",
bias.text.col = NULL,
bias.text.cex = 0.8,
loa.line.lty = 2,
loa.line.lwd = 1,
loa.line.col = "red",
loa.text.col = NULL,
plot.type = 3,
main = NULL,
cex = 0.8,
digits = 2,
add.grid = TRUE,
ylim = NULL,
...
)
No return value, instead a plot is generated
object of class "MCResult".
label for the x-axis
label for the y-axis
logical value. If ref.line=TRUE
(default), the reference line will be drawn.
reference line color.
reference line type.
reference line width.
line type for estimated bias.
line width for estimated bias.
color of the line for estimated bias.
color of the label for estimated bias (defaults to the same as bias.line.col
.)
The magnification to be used for the label for estimated bias
line type for estimated limits of agreement.
line width for estimated limits of agreement.
color of the line for estimated limits of agreement.
color of the label for estimated limits of agreement (defaults to the same as loa.line.col
.)
integer specifying a specific Bland-Altman plot modification (default is 3).
Possible choices are:
1 - difference plot X vs. Y-X with null-line and mean plus confidence intervals.
2 - difference plot X vs. (Y-X)/X (relative differences) with null-line and mean.
3 - difference plot 0.5*(X+Y) vs. Y-X with null-line and mean plus confidence intervals.
4 - difference plot 0.5*(X+Y) vs. (Y-X)/X (relative differences) with null-line.
5 - difference plot rank(X) vs. Y-X with null-line and mean plus confidence intervals.
6 - difference plot rank(X) vs. (Y-X)/X (relative differences) with null-line and mean.
7 - difference plot sqrt(X*Y) vs. Y/X with null-line and mean plus confidence intervals calculated with help of log-transformation.
8 - difference plot 0.5*(X+Y) vs. (Y-X) / (0.5*(X+Y)) with null-line.
plot title.
numeric value specifying the magnification factor used for points
number of decimal places for the difference of means and standard deviation appearing in the plot.
logical value. If add.grid=TRUE
(Default) gridlines will be drawn.
limits for the y-axis
further graphical parameters
Bland, J. M., Altman, D. G. (1986) Statistical methods for assessing agreement between two methods of clinical measurement. Lancet, i: 307--310.
plot.mcr
, plotResiduals
, plotDifference
, plotBias
, compareFit
#library("mcr")
data(creatinine,package="mcr")
x <- creatinine$serum.crea
y <- creatinine$plasma.crea
# Deming regression fit.
# The confidence intercals for regression coefficients
# are calculated with analytical method
model <- mcreg( x,y,error.ratio=1,method.reg="Deming", method.ci="analytical",
mref.name = "serum.crea", mtest.name = "plasma.crea", na.rm=TRUE )
plotDifference( model ) # Default plot.type=3
plotDifference( model, plot.type=5)
plotDifference( model, plot.type=7, ref.line.lty=3, ref.line.col="green3" )
Run the code above in your browser using DataLab