plot_pair_BA: Bland-Altman plot

Description Usage Arguments Value See Also Examples

View source: R/plot-pair_BA.R

Description

Bland-Altman plot

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
plot_pair_BA(
  predictor,
  outcome,
  SESOI_lower = 0,
  SESOI_upper = 0,
  confidence = 0.95,
  predictor_label = "Predictor",
  outcome_label = "Outcome",
  control = plot_control(),
  na.rm = FALSE
)

Arguments

predictor

Numeric vector

outcome

Vector

SESOI_lower

Lower smallest effect size of interest threshold

SESOI_upper

Upper smallest effect size of interest threshold

confidence

Default is 0.95

predictor_label

Character vector. The name of the predictor. Default is "Predictor"

outcome_label

Character vector. The name of the outcome. Default is "Outcome"

control

Plotting control object returned from plot_control

na.rm

Should NAs be removed? Default is FALSE

Value

ggplot object

See Also

plot_pair_lm for lm residuals plot and plot_pair_OLP for ordinary-least-squares residuals plot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
criterion <- rnorm(
  n = 100,
  mean = 100,
  sd = 10
)

practical <- criterion * 1.2 + rnorm(n = 100, mean = -12, sd = 5)

plot_pair_BA(practical,
  criterion,
  SESOI_lower = -10,
  SESOI_upper = 10,
  predictor_label = "Practical",
  outcome_label = "Criterion"
)

mladenjovanovic/bmbstats documentation built on Aug. 5, 2020, 4:20 p.m.