| derive_ctmax | R Documentation |
derive_ctmax() inverts the fitted thermal-survival curve 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
family-specific inverse curve built in, including the exact log-logistic
inverse for the default model.
For a supplied absolute surv target, a temperature-varying shape uses a
201-point bounded scan and refines one crossing detected inside temp_bounds
(the observed range by default). The relative default uses the analytic
inverse. Crossings closer than the scan spacing may not be distinguished.
derive_ctmax(
object,
surv = NULL,
duration = NULL,
group = NULL,
temp_bounds = NULL,
cell = NULL
)
object |
A |
surv |
Target survival probability in |
duration |
Exposure duration(s) (native time unit; strictly positive).
Defaults to the fit's |
group |
Optional single group level (grouped fits only). |
temp_bounds |
Optional finite increasing temperature bounds for the numerical inverse used when a fitted shape depends on temperature. The default is the fitted data's observed temperature range. |
cell |
Optional named list of one-row predictor values for a general
formula design. Use this when CTmax cells combine predictors and a shape
formula uses one of the source columns, for example
|
Let eta_curve(q) be the inverse of the selected normalized survival curve
at q = (surv - low) / (up - low). Solving for temperature gives
temp = CTmax - z * (log10(duration) - log10(tref) - eta_curve(q) / k).
The target surv must lie strictly between low and up.
For a supplied absolute surv target, a temperature-varying shape uses bounded
numerical inversion and requires one crossing detected by the fixed grid
inside the search interval. The relative default is evaluated analytically.
For a random-effects fit this is a population-level derived quantity; it does
not add a group BLUP (best linear unbiased predictor; see ranef()).
A numeric vector of temperatures (degrees C), one per duration.
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)
derive_ctmax(fit) # ~ CTmax (relative, at tref)
derive_ctmax(fit, surv = 0.5, duration = c(60, 240)) # absolute 50% survival
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.