set.seed(42)
true_vals <- rnorm(50, 100, 20)
method_a <- true_vals + rnorm(50, sd = 5)
method_b <- 1.05 * true_vals + 3 + rnorm(50, sd = 5)
dm <- deming_regression(method_a, method_b)
# Scatter plot with regression line
plot(dm)
# Without identity line
plot(dm, show_identity = FALSE)
# Residual plot
plot(dm, type = "residuals")
# Residuals by rank
plot(dm, type = "residuals", residual_type = "rank")
# Customized appearance
plot(dm, point_size = 3, title = "Glucose: POC vs Reference")
Run the code above in your browser using DataLab