BlandAltman {MethComp}R Documentation

Bland-Altman plot of differences versus averages.

Description

For two vectors of equal length representing measurements of the same quantity by two different methods, the differences are plotted versus the average. The limits of agreement (prediction limits for the differences) are plotted, optionally with c.i.s.

Usage

  BlandAltman(x, y,
            x.name = NULL, y.name = NULL, maintit = "",
            cex = 1, pch = 16, col.points = "black", col.lines = "blue",
            limx=NULL, ymax=NULL, xlab=NULL, ylab=NULL,
            print = TRUE, conf.int = TRUE,
            digits = 3, alpha = 0.05,
            ... )

Arguments

x Numerical vector of measurements by 1st method.
y Numerical vector of measurements by 2nd method. Must of same length as x.
x.name Label for the 1st method (x).
y.name Label for the 2nd method (y).
maintit Main title for the plot
cex Character expansion for the points.
pch Plot symbol for points.
col.points Color for the points.
col.lines Color for the lines indicating limits of agreement.
limx x-axis limits.
ymax Scalar. The y-axis will extend from -ymax to +ymax.
xlab x-axis label.
ylab y-axis label.
print Logical: Should the limits of agreement and the c.i.s of these be printed?
conf.int Logical: Should confidence inetrvals for the mean difference and the limits of agreement be plotted too?
digits How many decimal places should be used when printing limits of agreement? Used both for the printing of results and for annotation of the plot.
alpha 1 minus confidence level used when computing confidence intervals and limits of agreement.
... Further arguments passed on the the plot() function making the plot.

Value

A list with 2 elements:

lim.agree A matrix of limits of agreement as rows and estimate and c.i. as columns.
p.value P-value for the hypothesis that the mean difference is 0. Usually a lame thing to use.

Author(s)

Jaro Lajovic,jaro.lajovic@mf.uni-lj.si, 2004; modified 2007 by Bendix Carstensen bxc@steno.dk, http://www.biostat.ku.dk/~bxc.

References

JM Bland and DG Altman: Statistical methods for assessing agreement between two methods of clinical measurement, Lancet, i, 1986, pp. 307-310.

JM Bland and DG Altman. Measuring agreement in method comparison studies. Statistical Methods in Medical Research, 8:136-160, 1999.

See Also

BA.plot, MethComp.

Examples

data( ox )
# 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
mtab <- with( ox, tapply( y, list(interaction(item,repl), meth), mean ) )
CO <- mtab[,"CO"]
pulse <- mtab[,"pulse"]
BlandAltman( CO, pulse )

[Package MethComp version 0.1.1 Index]