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