plot_survival_curves: Plot fitted survival curves against duration

View source: R/plotting.R

plot_survival_curvesR Documentation

Plot fitted survival curves against duration

Description

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() or workflow object from fit_4pl(). Workflow objects retain the standardized duration unit.

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", times = c(30, 60, 120, 240, 480),
                  CTmax = 36, z = 4, tref = 60, seed = 1)
dat <- standardize_data(d, temp = "temp", duration = "duration",
  n_total = "total", n_surv = "survived", duration_unit = "minutes")
fit <- fit_4pl(dat, family = "binomial", t_ref = 60,
  method = "wald", quiet = TRUE)
plot_survival_curves(fit)


freqTLS documentation built on Dec. 4, 2026, 5:11 p.m.