Skip to contents

plot_survival_curves() draws the fitted survival probability as a function of exposure duration (on a log10 x-axis), one curve per temperature, with the observed survival proportions overlaid as points. For a grouped fit the curves are faceted by group.

Usage

plot_survival_curves(fit, temps = NULL, times = NULL, ...)

Arguments

fit

A profile_tls fit from fit_tls().

temps

Numeric vector of temperatures to draw curves for. Defaults to the distinct observed temperatures (capped at a readable number).

times

Numeric vector of durations to evaluate the smooth curve over. Defaults to a log-spaced sequence over the observed duration range.

...

Reserved; must be empty.

Value

A ggplot object.

Examples

d <- simulate_tls(family = "binomial", CTmax = 36, z = 4, seed = 1)
fit <- fit_tls(d, y = survived, n = total, time = duration, temp = temp,
               family = "binomial", tref = 1)
plot_survival_curves(fit)
Fitted 4PL survival curves from a simulated binomial fit: survival probability declining with log exposure duration, one coloured line per assay temperature from 30 to 42 degrees Celsius (hotter temperatures decline sooner), with observed proportions overlaid as points.