bland_altman: Bland-Altman analysis

bland_altmanR Documentation

Bland-Altman analysis

Description

[Experimental]

Functions that use the Bland-Altman method to assess the agreement between two numerical vectors.

Usage

s_bland_altman(x, y, conf_level = 0.95)

g_bland_altman(x, y, conf_level = 0.95)

Arguments

x

(numeric)
vector of numbers we want to analyze.

y

(numeric)
vector of numbers we want to analyze, to be compared with x.

conf_level

(proportion)
confidence level of the interval.

Value

  • s_bland_altman() returns a named list of the following elements: df, difference_mean, ci_mean, difference_sd, difference_se, upper_agreement_limit, lower_agreement_limit, agreement_limit_se, upper_agreement_limit_ci, lower_agreement_limit_ci, t_value, and n.

  • g_bland_altman() returns a ggplot Bland-Altman plot.

Functions

  • s_bland_altman(): Statistics function that compares two numeric vectors using the Bland-Altman method and calculates a variety of statistics.

  • g_bland_altman(): Graphing function that produces a Bland-Altman plot.

Examples

x <- seq(1, 60, 5)
y <- seq(5, 50, 4)
conf_level <- 0.9

# Derive statistics that are needed for Bland-Altman plot
s_bland_altman(x, y, conf_level = conf_level)

# Create a Bland-Altman plot
g_bland_altman(x = x, y = y, conf_level = conf_level)


tern documentation built on June 22, 2024, 10:25 a.m.