# S3 method for class 'bayesnechurdlefit'
plot(
  x,
  ...,
  which = "combined",
  CI = TRUE,
  add_nec = TRUE,
  resolution = 1000,
  x_range = NA,
  xform = NULL,
  ylab = NULL,
  xlab = "Predictor"
)

Arguments

x

An object of class bayesnechurdlefit.

...

Further arguments to plot.

which

Which curve to plot: "combined" (the default), "growth", "survival", or "all" for three panels.

CI

Should credible intervals be drawn? Defaults to TRUE.

add_nec

Should the no-effect estimate be drawn? Defaults to TRUE.

resolution

The number of unique predictor values to predict over.

x_range

A range of predictor values to plot over.

xform

NULL, the default, or a function applied to the recorded predictor and no-effect line. With an inline transformation, the function gives a warning naming the inverse already applied.

ylab

Y axis label. Defaults to a label describing which.

xlab

X axis label.

Value

A plot.

Details

The default plots the combined endpoint only – the expected response per individual exposed – because that is the quantity a hurdle model exists to estimate. which = "all" adds the two components as separate panels; they are not overlaid because the growth curve is in response units and the survival curve is a probability, so sharing one pair of axes would misrepresent their relative magnitude.

Where crf() transforms the predictor inline, as crf(log(concentration)) does, the observed points, the curve and the no-effect line are drawn on the recorded scale, the scale the prediction grid is built on, as plot draws a bayesnecfit. The line is the estimate nec returns by default, which is on that scale. A supplied xform is applied to the recorded axis and no-effect estimate.