Learn R Programming

pubh (version 3.0.0)

bland_altman: Bland-Altman agreement plots.

Description

Bland-Altman agreement plots.

Usage

bland_altman(data, x, y, size = 1, transform = FALSE)

Arguments

data

A data frame.

x

A numerical variable.

y

A numerical variable.

size

Size of the symbol using to plot data.

transform

Logical, should ratios instead of differences be used to construct the plot?

Details

bland_altman constructs Bland-Altman agreement plots.

Variables in formula are continuous paired observations. When the distribution of the outcome is not normal, but becomes normal with a log-transformation, bland_altman can plot the ratio between outcomes (difference in the log scale) by using option transform = TRUE.

Examples

Run this code
data(Sharples)

Sharples |>
  bland_altman(
    x = weight, y = srweight,
    transform = TRUE, size = 0.7
  ) +
  xlab("Mean of weights (kg)") +
  ylab("Measured / Self-reported weight")

Run the code above in your browser using DataLab