# Specify the type for difference plot
data("platelet")
object <- blandAltman(x = platelet$Comparative, y = platelet$Candidate)
autoplot(object)
autoplot(object, type = "relative")
# Set the addition parameters for `geom_point`
autoplot(object,
type = "relative",
jitter = TRUE,
fill = "lightblue",
color = "grey",
size = 2
)
# Set the color and line type for reference and limits of agreement lines
autoplot(object,
type = "relative",
ref.line.params = list(col = "red", linetype = "solid"),
loa.line.params = list(col = "grey", linetype = "solid")
)
# Set label color, size and digits
autoplot(object,
type = "absolute",
ref.line.params = list(col = "grey"),
loa.line.params = list(col = "grey"),
label.digits = 2,
label.params = list(col = "grey", size = 3, fontface = "italic")
)
# Add main title, X and Y axis titles, and adjust X ticks.
autoplot(object,
type = "absolute",
x.nbreak = 6,
main.title = "Bland-Altman Plot",
x.title = "Mean of Test and Reference Methods",
y.title = "Reference - Test"
)
# Using the default arguments for regression plot
data("platelet")
fit <- mcreg(
x = platelet$Comparative, y = platelet$Candidate,
method.reg = "Deming", method.ci = "jackknife"
)
autoplot(fit)
# Only present the regression line and alter the color and shape.
autoplot(fit,
identity = FALSE,
reg.params = list(col = "grey", linetype = "dashed"),
legend.title = FALSE,
legend.digits = 4
)
Run the code above in your browser using DataLab