plot_survival_surface: Plot the fitted survival surface over temperature and...

View source: R/plotting.R

plot_survival_surfaceR Documentation

Plot the fitted survival surface over temperature and duration

Description

plot_survival_surface() draws the fitted survival probability as a filled heatmap over a temperature-by-duration grid, with contour lines, using predict_survival_surface(). Duration is on a log10 axis. For a grouped fit the surface is faceted by group.

Usage

plot_survival_surface(fit, temps = NULL, times = NULL, contour = TRUE, ...)

Arguments

fit

A profile_tls fit from fit_tls() or workflow object from fit_4pl(). Workflow objects retain the standardized duration unit.

temps, times

Numeric grids passed to predict_survival_surface(). Defaults span the observed ranges.

contour

Logical; overlay contour lines (default TRUE).

...

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_surface(fit)


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