baplot | R Documentation |
Produce a Bland-Altman plot.
baplot(
x,
y,
pch = 20,
col = "black",
bg = "black",
main = "",
xlab = "Mean",
ylab = "Difference",
lwd1 = 1,
lwd2 = 1,
cex = 1,
lcol = "black"
)
x |
the first vector of outcomes. |
y |
the second vector of outcomes. |
pch |
the plotting character. Defaults to 20, a bullet. |
col |
the foreground color. Defaults to black. |
bg |
the background color. Defaults to black. |
main |
a title for the plot. Defaults to no title, i.e., |
xlab |
a title for the x axis. Defaults to |
ylab |
a title for the y axis. Defaults to |
lwd1 |
the line width for the scatter plot. Defaults to 1. |
lwd2 |
the line width for the confidence band. Defaults to 1. |
cex |
scaling factor for the scatter plot. Defaults to 1. |
lcol |
line color for the confidence band. Defaults to black. |
This function produces rather customizable Bland-Altman plots, using the plot
and abline
functions. The former is used to create the scatter plot. The latter is used to display the confidence band.
Altman, D. G. and Bland, J. M. (1983). Measurement in medicine: The analysis of method comparison studies. The Statistician, 307–317.
Nissi, M. J., Mortazavi, S., Hughes, J., Morgan, P., and Ellermann, J. (2015). T2* relaxation time of acetabular and femoral cartilage with and without intra-articular Gd-DTPA2 in patients with femoroacetabular impingement. American Journal of Roentgenology, 204(6), W695.
# Produce a Bland-Altman plot for the cartilage dataset.
data(cartilage)
baplot(cartilage$pre, cartilage$post, pch = 21, col = "navy", bg = "darkorange", lwd1 = 2,
lwd2 = 2, lcol = "navy")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.