BlandAltman(x, y, x.name = NULL, y.name = NULL, maintit = "", cex = 1, pch = 16, col.points = "black", col.lines = "blue", limx = NULL, limy = NULL, ymax = NULL, eqax = FALSE, xlab = NULL, ylab = NULL, print = TRUE, reg.line = FALSE, digits = 2, mult = FALSE, alpha, ... ) AB.plot( y1, y2, meth.names = NULL, mean.repl = FALSE, conn.repl = !mean.repl, lwd.conn = 1, col.conn = "black", comp.levels = 2:1, ... )x.x).y).TRUE, the regression line of x-y on
(x+y)/2 is drawn. If numerical the regression
equation is printed with the given number of digits
after the decimal points.Meth object or a dataframe with columns
meth, item, y, and possibly repl.y1
is a dataframe.y1 is a dataframe names are
derived from the factor level names of meth.item and meth be formed
before further ado. WARNING: This will give too narrow
limits of agreement.meth factor to compare. May be used
to switch the order of the methods compared by specifying
comp.meth=2:1.BA.plot to
BlandAltman and possibly further to the plot
function. The arguments passed to BlandAltman are
used for fine-tuning the appearance of the plot.BA.check; list with 3 elements:
alpha), slope
(beta), the prediction standard deviation (pr.sd) and
half the width of the prdiction interval (pr.int).JM Bland and DG Altman. Measuring agreement in method comparison studies. Statistical Methods in Medical Research, 8:136-160, 1999.
B Carstensen: Comparing methods of measurement: Extending the LoA by regression. Stat Med. 2010 Feb 10;29(3):401-10.
BA.plot, MCmcmc.
data( ox )
par( mfrow=c(1,2) )
# Wrong to use mean over replicates
mtab <- with( ox, tapply( y, list(item, meth), mean ) )
CO <- mtab[,"CO"]
pulse <- mtab[,"pulse"]
BlandAltman( CO, pulse )
# (almost) Right to use replicates singly
par( mfrow=c(1,1) )
oxw <- to.wide( ox )
CO <- oxw[,"CO"]
pulse <- oxw[,"pulse"]
BlandAltman( CO, pulse, mult=TRUE )
BlandAltman( CO, pulse, eqax=TRUE )
data( plvol )
BA.plot( plvol )
BA.plot( plvol, reg.line=TRUE )
BA.plot( plvol, reg.line=2 )
Run the code above in your browser using DataLab