Agreement between two continuous measurements is usually assessed by plotting the difference vs. the mean of the two measurements, the socalled BlandAltman plot. Methods can be used interchangeably if all observations in the BlandAltman 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.
1 2 
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 xaxis. 
laby 
Character string, label for yaxis. 
maintit 
Main title of plot. 
limy 
2d vector containing upper and lower limit for scaling of yaxis. 
plot 
If 
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 
tquantile used for computation of limits of agreement. 
Kaspar Rufibach
kaspar.rufibach@gmail.com
Bland, J.M. and Altman, D.G. (1986). Statistical methods for assessing agreement between two methods of clinical measurement. Lancet, 1, 307–310.
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)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.