BlandAltman: Bland-Altman plot to assess agreement between two continuous...

Description Usage Arguments Value Author(s) References Examples

Description

Agreement between two continuous measurements is usually assessed by plotting the difference vs. the mean of the two measurements, the so-called Bland-Altman plot. Methods can be used interchangeably if all observations in the Bland-Altman lie between the mean +/- two standard deviations, provided that differences in this range were not clinically important. Note that the function automatically only uses pairwise complete observations.

Usage

1
2
BlandAltman(x, y, conf.level = 0.95, group = NA, labx = "", laby = "", 
    maintit = "", limy = NA, plot = TRUE)

Arguments

x

Measurements of first method.

y

Measurements of second method.

conf.level

Confidence level for confidence intervals around limitis of agreement.

group

Factor that enables different colors for points (e.g. to mark observations at different timepoints).

labx

Character string, label for x-axis.

laby

Character string, label for y-axis.

maintit

Main title of plot.

limy

2-d vector containing upper and lower limit for scaling of y-axis.

plot

If TRUE Bland-Altman plot is generated.

Value

A list containing the following elements:

difference.mean

Mean difference.

difference.sd

Standard deviation of differences.

difference.se

Standard error of mean differences.

upper.agreement.limit

Upper limit of agreement.

lower.agreement.limit

Lower limit of agreement.

agreement.limit.se

Standard error of limits of agreement.

t.value

t-quantile used for computation of limits of agreement.

Author(s)

Kaspar Rufibach
kaspar.rufibach@gmail.com

References

Bland, J.M. and Altman, D.G. (1986). Statistical methods for assessing agreement between two methods of clinical measurement. Lancet, 1, 307–310.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
n <- 50
meas1 <- rnorm(n, 20, 4)
meas2 <- meas1 + rnorm(n, 0.5, 1)
time <- sample(c(rep(1, n / 2), rep(2, n / 2)))

BlandAltman(x = meas1, y = meas2, conf.level = 0.95, group = NA, labx = 
    "mean of measurements", laby = "difference of measurements", 
    maintit = "Assess agreement between measurement 1 and measurement 2", 
    limy = NA)

BlandAltman(x = meas1, y = meas2, conf.level = 0.95, group = time, labx = 
    "mean of measurements", laby = "difference of measurements",
    maintit = "Assess agreement between measurement 1 and measurement 2", 
    limy = NA)

biostatUZH documentation built on May 2, 2019, 6:06 p.m.