survival_from_dose: Survival corresponding to an accumulated dose

View source: R/predict_heat_injury.R

survival_from_doseR Documentation

Survival corresponding to an accumulated dose

Description

Inverts the dose interpretation: at dose = 1, survival equals the threshold by construction. The 4PL maps dose smoothly to survival on the reference dose-response curve.

Usage

survival_from_dose(
  dose,
  low,
  up,
  k,
  target_surv = "relative",
  model = "log-logistic"
)

Arguments

dose

Numeric vector of cumulative doses (in units where 1 dose = 1 LT-dose at the chosen threshold).

low, up, k

4PL parameters at the reference (centring) temperature.

target_surv

Either the literal probability defining "1 dose" or the string "relative" for the (low + up)/2 threshold.

model

The dose-response model: a name (default "log-logistic") or a resolved registry entry. Survival is read off that model's curve.

Value

Numeric vector of predicted survival probabilities. NA for every element when a numeric target_surv lies outside ⁠(low, up)⁠ and is therefore unreachable on this draw's 4PL (mirrors time_to_surv_threshold_4pl(), so the draw drops cleanly rather than producing log()-of-negative NaNs that would poison the trace).


bayesTLS documentation built on Nov. 29, 2026, 1:06 a.m.