View source: R/predict_survival_curves.R
| predict_survival_curves | R Documentation |
The frequentist analogue of bayesTLS::predict_survival_curves(). Evaluates the
fitted thermal-survival probability over a temperature-by-duration grid and adds
parametric-bootstrap confidence bands. For random-effects fits the curves are
population-level: random intercepts are integrated during bootstrap refits,
but no fitted group BLUP (best linear unbiased predictor; see ranef()) is
added to the reported curve.
predict_survival_curves(
object,
temps = NULL,
durations = NULL,
nboot = 500L,
level = 0.95,
seed = NULL,
by = NULL
)
object |
A |
temps |
Temperatures to predict at (default: the observed assay temps). |
durations |
Exposure durations in minutes (default: 100 points
log-spaced over the observed range). |
nboot |
Number of bootstrap replicates for the bands (default 500).
Bootstrap bands currently require shared fixed-effect shape formulas
( |
level |
Confidence level (default 0.95). |
seed |
Optional RNG seed. |
by |
Optional name for the grouping column. |
A freq_surv_curves object: $summary (a tibble of
[<group>,] temp, duration, survival_lower, survival_median, survival_upper)
and $meta.
fit_4pl(), predict_survival_surface(), tls()
raw <- simulate_tls(family = "binomial", CTmax = 36, z = 4,
times = c(30, 60, 120, 240, 480), tref = 60, seed = 1)
dat <- standardize_data(
raw, temp = "temp", duration = "duration",
n_total = "total", n_surv = "survived", duration_unit = "minutes"
)
fit <- fit_4pl(dat, family = "binomial", t_ref = 60, quiet = TRUE)
curves <- predict_survival_curves(
fit, temps = c(34, 36), durations = c(60, 240), nboot = 10, seed = 1
)
curves$summary
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.