Description Details Author(s) References See Also Examples
Bland-Altman Plots for assessing agreement between two methods of clinical measurement and returning associated statistics. Plots are optionally extended by confidence intervals as described in "J. Martin Bland, Douglas G. Altman (1986): Statistical Methods For Assessing Agreement Between Two Methods Of Clinical Measurement" but not included in the graphics of that publication. Either base graphics or ggplot2 can be used.
Package: | BlandAltmanLeh |
Type: | Package |
Version: | 0.3.1 |
Date: | 2015-12-23 |
License: | GPL |
Bland Altman plots are a diagnostic tool for assessing the agreement between two methods of measurement or assessing retest reliability from two measurements. This package offers plots in base and ggplot2 graphics as well as detailed descriptive statistics, thus supporting the construction of individual plots based on Bland Altman plots. Bland and Altman describe a way for constructing confidence intervals. This package computes these confidence intervals and includes them into the plots. It also invents the Sunflower-Bland-Altman plot for data with ties.
Bernhard Lehnert
Maintainer: Bernhard K. Lehnert <bernhard.lehnert@uni-greifswald.de>
Bland JM, Altman DG, Statistical Methods For Assessing Agreement Between Two Methods Of Clinical Measurement, Lancet, 1986; 307-310.
Altman DG, Bland JM, Measurement in medicine: the analysis of method comparison studies, The Statistician 1983; 32, 307-317.
Vaz S et al., The Case for Using the Repeatability Coeffcient When Calculating Test-Retest Reliability, PLOS ONE, Sept. 2013, Vol 8, Issue 9.
bland.altman.plot,bland.altman.stats
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # simple basic Bland Altman plot
a <- rnorm(40,30,10)
b <- 1.01*a + rnorm(40)
bland.altman.plot(a,b, xlab="mean", ylab="difference")
# to get all the data for further analysis
bland.altman.plot(a,b, xlab="mean", ylab="difference", silent=FALSE)
# to include confidence intervals into the plot
bland.altman.plot(a,b, xlab="mean", ylab="difference", conf.int=.95)
# to plot in ggplot2
bland.altman.plot(a,b, graph.sys="ggplot2")
# to mark ties in a Sunflower-Bland-Altman plot
a <- sample(1:5, 40, replace=TRUE)
b <- rep(c(1,2,3,3,5,5,5,5),5)
bland.altman.plot(a, b, sunflower=TRUE)
|
NULL
$means
[1] 40.227634 40.081395 31.954782 28.453320 23.988921 31.378234 23.964804
[8] 24.054789 29.094798 23.056872 28.237601 25.706869 18.815073 23.525241
[15] 25.689967 34.400817 42.772294 17.184033 18.800552 36.428393 34.335449
[22] 38.563500 34.972640 29.934570 25.053342 25.378789 26.714383 37.744194
[29] 29.802703 22.468544 37.747600 40.503624 43.204251 25.455288 31.729973
[36] 1.664504 28.558581 30.310877 -3.062881 35.390849
$diffs
[1] -1.97394384 -0.13763824 -0.91228771 0.07029261 0.91466090 -0.98775579
[7] -1.19398413 0.55122413 -0.77459767 -1.43630176 1.15484895 1.17531873
[13] -1.08857841 -0.55165488 0.16443956 1.00059700 0.81466541 -0.39593243
[19] 0.10820796 -0.74466676 -2.11199646 0.52638900 -0.81565308 -0.94974713
[25] -1.52535368 0.19102166 -0.29950814 -1.94097037 1.14996962 -0.18534673
[31] -0.87629190 -0.44344858 -0.03274173 -1.52477336 -0.30844176 0.78765067
[37] 0.40298207 0.68963164 -1.88220993 -0.48060577
$groups
group1 group2
1 39.240663 41.214606
2 40.012576 40.150214
3 31.498638 32.410926
4 28.488466 28.418174
5 24.446251 23.531590
6 30.884356 31.872112
7 23.367812 24.561796
8 24.330401 23.779177
9 28.707499 29.482097
10 22.338721 23.775023
11 28.815025 27.660176
12 26.294528 25.119209
13 18.270784 19.359362
14 23.249414 23.801068
15 25.772187 25.607747
16 34.901115 33.900518
17 43.179626 42.364961
18 16.986067 17.381999
19 18.854656 18.746448
20 36.056059 36.800726
21 33.279451 35.391447
22 38.826694 38.300305
23 34.564814 35.380467
24 29.459696 30.409443
25 24.290665 25.816018
26 25.474300 25.283278
27 26.564629 26.864137
28 36.773708 38.714679
29 30.377687 29.227718
30 22.375870 22.561217
31 37.309454 38.185746
32 40.281900 40.725349
33 43.187880 43.220622
34 24.692902 26.217675
35 31.575752 31.884194
36 2.058330 1.270679
37 28.760072 28.357090
38 30.655693 29.966061
39 -4.003986 -2.121776
40 35.150546 35.631152
$based.on
[1] 40
$lower.limit
[1] -2.205308
$mean.diffs
[1] -0.3468133
$upper.limit
[1] 1.511682
$lines
lower.limit mean.diffs upper.limit
-2.2053085 -0.3468133 1.5116820
$CI.lines
lower.limit.ci.lower lower.limit.ci.upper mean.diff.ci.lower
-2.2053085 -2.2053085 -0.3468133
mean.diff.ci.upper upper.limit.ci.lower upper.limit.ci.upper
-0.3468133 1.5116820 1.5116820
$two
[1] 1.96
$critical.diff
[1] 1.858495
NULL
Loading required namespace: ggplot2
NULL
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.