Creates a ggplot2 plot of a bayesnechurdlefit

# S3 method for class 'bayesnechurdlefit'
autoplot(
  object,
  ...,
  which = "combined",
  CI = TRUE,
  resolution = 1000,
  x_range = NA,
  xform = NULL,
  xlab = "Predictor",
  ylab = NULL,
  point_alpha = 0.25,
  x_scale = c("recorded", "fitted"),
  nec = TRUE,
  ecx = FALSE,
  ecx_val = 10
)

Arguments

object

An object of class bayesnechurdlefit.

...

Not used. dpar is refused, so select a curve with which, and any other argument is refused as well.

which

Which curve(s) to return. See plot.

CI

Should credible intervals be drawn? Defaults to TRUE.

resolution

The number of unique predictor values.

x_range

A range of predictor values.

xform

NULL, the default, or a function to apply to the predictor on the scale x_scale selects. With an inline predictor transformation, a function on the default recorded scale gives a warning.

xlab

X axis label.

ylab

Y axis label. Defaults to NULL, which labels each panel by what it shows.

point_alpha

The opacity factor for the observation points, a single number from 0 to 1. It multiplies the existing opacity of the first colour of the current R palette. Defaults to 0.25.

x_scale

"recorded" (the default) or "fitted". The fitted option returns the predictor on the scale transformed inside crf(), with breaks in attribute "x_axis" labelled in recorded units.

nec

Should the no-effect estimate and its credible limits be drawn on each panel? A bound is marked at the plotted range. Defaults to TRUE.

ecx

Should an ECx estimate and its credible limits be drawn on each panel? A bound is marked at the plotted range. Defaults to FALSE.

ecx_val

The percentage effect for ecx; defaults to 10.

Value

A ggplot object.

Details

As for plot, the default is the combined endpoint alone and which = "all" facets rather than overlays, because the three curves are not on a common scale. Each panel carries a single series, so no colour encoding or legend is needed.