| predict_survival_surface | R Documentation |
predict_survival_surface() evaluates the fitted survival probability on a
factorial grid of temperatures by durations, returning a long data frame
suitable for a heatmap or contour plot (see plot_survival_surface()).
For random-effects fits this helper returns population-level predictions
(random intercepts set to zero); use predict(..., re.form = "conditional")
for known-group conditional predictions. General continuous fixed designs
require predict() with their covariate columns supplied in newdata.
predict_survival_surface(object, temps = NULL, times = NULL, group = NULL)
object |
A |
temps |
Numeric vector of temperatures. Defaults to a length-60 sequence spanning the fit's observed temperature range. |
times |
Numeric vector of durations (strictly positive). Defaults to a length-60 log-spaced sequence spanning the fit's observed duration range. |
group |
Optional single group level (grouped fits only). When |
A long data.frame with columns temp, duration, survival
(and group when the fit is grouped).
d <- simulate_tls(family = "binomial", times = c(30, 60, 120, 240, 480),
CTmax = 36, z = 4, tref = 60, seed = 1)
fit <- fit_tls(d, y = survived, n = total, time = duration, temp = temp,
family = "binomial", tref = 60)
head(predict_survival_surface(fit, temps = c(34, 36, 38), times = c(60, 120, 240)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.