# Basic Bland-Altman plot
set.seed(42)
method_a <- rnorm(50, mean = 100, sd = 15)
method_b <- method_a + rnorm(50, mean = 2, sd = 5)
ba <- ba_analysis(method_a, method_b)
plot(ba)
# Without confidence intervals
plot(ba, show_ci = FALSE)
# Customized appearance
plot(ba,
point_alpha = 0.8,
point_size = 3,
title = "Method Comparison: A vs B")
# Further customization with ggplot2
library(ggplot2)
plot(ba) +
theme_minimal() +
scale_color_brewer(palette = "Set1")
# Using autoplot (ggplot2-style)
autoplot(ba)
Run the code above in your browser using DataLab