View source: R/temperature_scenarios.R
| planted_dose_from_trace | R Documentation |
Implements the classical HI integral exactly (Equation 8 of the manuscript),
given known TDT parameters. Use this as the truth that
predict_heat_injury() should recover when fed the same trace and a model
fit whose posterior is consistent with (z, CTmax_1hr, T_c).
planted_dose_from_trace(trace, z, CTmax_1hr, T_c)
trace |
Tibble with columns |
z |
Thermal sensitivity, °C per 10-fold change in time. |
CTmax_1hr |
Static temperature at which LT50 = 1 hour, °C. |
T_c |
Damage threshold (°C); contributions below |
Integrated by forward Euler from zero: the interval ending at point i
accrues the rate at its start (point i-1) times that interval's width,
\Delta HI_i = 100 \cdot 10^{(T_{i-1} - CT_{max,1hr}) / z} \cdot (t_i - t_{i-1})
when T_{i-1} > T_c, and zero otherwise (and hi_inc[1] = 0). Cumulative HI
is the running sum. This matches predict_heat_injury()'s integrator.
The input trace augmented with two new columns:
- hi_inc — instantaneous HI contribution at each hour (%).
- hi_cumulative — running sum of hi_inc (%).
scens <- make_temperature_scenarios(spike_temp = 30)
planted_dose_from_trace(scens$single_spike, z = 5, CTmax_1hr = 32, T_c = 25)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.