blandAltman | R Documentation |
The Bland-Altman plot (AKA Tukey mean-difference plot) is a graphical tool to measure agreement between two estimates of a single variables methods.
blandAltman(x1, x2, xlab = "Average",
ylab = "Difference",
alpha = 0.05)
x1 |
the first estimate |
x2 |
the second estimate |
xlab |
a label of x-axis on which the mean of the two estimates is plotted |
ylab |
a label of y-axis on which the difference between the two estimates is plotted |
alpha |
significance level of the confidence interval |
Code taken from http://rstats.tiddlyspot.com/#Bland-Altman and updated slightly.
a list of 'mean' (the of the two estimates), 'diff' (the diff of the estimates, 'se' (the standard error of the differences), and the '1-alpha/2' confidence intervals for the 'mean +/- 2 * SD of diffs' given as 'lower' and 'upper'
Tomas Sieger
Bland JM, Altman DG (1986) _Statistical methods for assessing agreement between two methods of clinical measurement.__ Lancet 327 (8476): 30710.
n<-20
x<-rnorm(n)
x1<-x+rnorm(n,0,.1)
x2<-x+rnorm(n,0,.1)
blandAltman(x1,x2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.