Skip to contents

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().

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", CTmax = 36, z = 4, seed = 1)
fit <- fit_tls(d, y = survived, n = total, time = duration, temp = temp,
               family = "binomial", tref = 1)
plot_survival_surface(fit)
Fitted survival surface from a simulated binomial fit: a filled heatmap over temperature by log-duration with contour lines, high survival at low temperatures and short durations grading to low survival at high temperatures and long durations.