Derive the temperature giving a target survival at a fixed exposure
Source:R/predict.R
derive_ctmax.Rdderive_ctmax() inverts the fitted 4PL for temperature: it returns the
assay temperature at which survival equals a target surv after exposure
duration. By default surv is the relative midpoint threshold
(low + up) / 2 and duration is tref, so derive_ctmax(fit) reproduces
the fitted CTmax. Supplying an absolute surv gives the absolute-
threshold critical temperature (the analogue of the bayesTLS
extract_tdt() absolute mode), with the asymmetry correction
qlogis((surv - low) / (up - low)) / k built in.
Arguments
- object
A
profile_tlsfit fromfit_tls().- surv
Target survival probability in
(low, up).NULL(default) uses the relative midpoint(low + up) / 2, reproducingCTmaxattref.- duration
Exposure duration(s) (native time unit; strictly positive). Defaults to the fit's
tref.- group
Optional single group level (grouped fits only).
Details
Solving surv = low + (up - low) * plogis(-k (log10(duration) - mid)) with
mid = log10(tref) - (temp - CTmax) / z for the temperature gives
$$temp = CTmax - z\Big(\log_{10} duration - \log_{10} t_{ref} +
\mathrm{qlogis}\!\big(\tfrac{surv - low}{up - low}\big) / k\Big).$$
The target surv must lie strictly between low and up.
For a random-effects fit this is a population-level derived quantity; it does
not add a group BLUP.
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)
derive_ctmax(fit) # ~ CTmax (relative, at tref)
#> [1] 35.92586
derive_ctmax(fit, surv = 0.5, duration = c(1, 4)) # absolute 50% survival
#> [1] 35.92114 33.51409