| derive_z | R Documentation |
Derives z = -1 / (\mathrm{d}/\mathrm{d}T\,\log_{10}\mathrm{LT}(T)) per
posterior draw, read straight from the fitted 4PL coefficients — no
regression. There are two regimes:
derive_z(
workflow,
target_surv = "relative",
temp_grid = NULL,
ndraws = NULL,
probs = c(0.025, 0.5, 0.975),
h = 0.001,
seed = NULL,
by = NULL
)
workflow |
Fitted |
target_surv |
Threshold mode: |
temp_grid |
Temperatures at which to evaluate local z and over which to pool. Default: the observed (unique) assay temperatures — pooling only where the data inform the curve. |
ndraws |
Posterior draws to subsample, or |
probs |
Quantile probabilities for the summaries. Default
|
h |
Temperature step (°C) for the central finite difference.
Default |
seed |
Optional integer seeding the draw subsample (relevant only
when |
by |
Optional moderator column(s) for per-group z. |
Relative threshold (default; the (\ell+u)/2 midpoint):
\log_{10}\mathrm{LT}_{\text{rel}}(T) = \mathrm{mid}(T) =
\beta_0 + \beta_1 (T-\bar T) is exactly linear, so
z = -1/\beta_1 where \beta_1 is the temperature slope on
mid (b_mid_temp_c). The asymptotes \ell, u and slope k
do not enter (the midpoint cancels the curve asymmetry). z is constant in
temperature.
Absolute threshold p: the LT curve gains the fitted model's
offset from the midpoint, \log_{10}\mathrm{LT}_p(T) = \mathrm{mid}(T) +
C_p(T). For the log-logistic (fit_4pl())
C_p = \tfrac{1}{k(T)}\log\tfrac{u(T)-p}{p-\ell(T)}; the log-normal
and Weibull models (fit_lognormal(), fit_weibull()) use their own
closed forms. When \ell, u or
k carry temperature effects this bends the curve, so z varies with
temperature. A local z(T) = -1/m(T) is computed at each assay
temperature, where the local slope m(T) is obtained by a central
finite difference of the closed-form LT curve (step h). When the shape
parameters are constant in T the correction is flat and this reduces to
-1/\beta_1.
The returned pooled z (the default single summary) is the per-draw mean
of the local z(T) over temp_grid. The full per-temperature local
z(T) is also returned. z is invariant to the time unit (a constant
time-multiplier shifts the LT intercept, not its slope), so no
time_multiplier is needed here.
A list with:
draws: tibble (.draw, z) — pooled per-draw z.
summary: tibble (z_median, z_lower, z_upper).
local_draws: tibble (.draw, temp, z) — local z(T) per draw.
local_summary: tibble (temp, z_median, z_lower, z_upper).
target_surv, temp_grid.
For a grouped fit each tibble gains the moderator column(s).
## Not run:
wf <- fit_4pl(std)
z <- derive_z(wf) # relative: z = -1 / b_mid_temp_c per draw
z$summary
derive_z(wf, target_surv = "absolute")$local_summary # local z(T)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.