Skip to contents

Plot a comparison of POSCs

Usage

# S3 method for class 'posc_comparison'
autoplot(
  object,
  full = FALSE,
  colors = NULL,
  ci = TRUE,
  percent = FALSE,
  grid = TRUE,
  mark = NULL,
  mark_ci = FALSE,
  title = NULL,
  subtitle = NULL,
  ...
)

# S3 method for class 'posc_comparison'
plot(x, ...)

Arguments

object, x

A "posc_comparison" object from posc_comp().

full

Plot the full sigmoid over negative and positive differences?

colors

Colours for the curves, one per curve. Defaults to a colour-blind-safe palette.

ci

Draw confidence bands (where available)?

percent

Label the probability axis as percentages instead of probabilities?

grid

Draw light gridlines?

mark, mark_ci

Differences in the predictor to highlight on every curve, and whether to add confidence intervals to their labels; see autoplot.posc().

title, subtitle

Plot title and subtitle. None by default; supply a string, or TRUE for an automatic one (the subtitle then reports the test of equal correlations).

...

Passed from plot() to autoplot().

Value

autoplot() returns a ggplot object; plot() returns it invisibly.

Examples

cmp <- posc_comp(a = posc_uni(0.5, n = 100), b = posc_uni(0.3, n = 100))
plot(cmp)

plot(cmp, mark = 1, title = TRUE, subtitle = TRUE)