| plot_tdt_curve | R Documentation |
plot_tdt_curve() draws the duration at which survival crosses a target
probability p against
temperature – the classic thermal-death-time line, here read directly off the
fitted curve via derive_lt(). With the default p = NULL, each line uses its
fitted relative midpoint (low + up) / 2, not necessarily absolute 50%
survival. Supply a numeric p for an absolute survival threshold. Time is
shown on a log10 axis. For a grouped fit a line is drawn per group.
plot_tdt_curve(
fit,
p = NULL,
temps = NULL,
panels = c("log", "linear", "both"),
colour = NULL,
target_surv = NULL,
...
)
fit |
A |
p |
|
temps |
Numeric vector of temperatures. Defaults to a sequence over the observed temperature range. |
panels |
Which duration scale to draw: "log" (default), "linear", or "both". The log default preserves prior freqTLS behavior; bayesTLS defaults to both panels. |
colour |
Optional fixed line colour. When NULL (default), grouped fits use the group colour aesthetic. |
target_surv |
Alias for p. Accepts a numeric survival probability, "relative", or "absolute" (which means 0.5). |
... |
Reserved; must be empty. |
A ggplot for one panel. For panels = both, returns a patchwork object when patchwork is installed, or a named list of linear and log ggplots otherwise.
d <- simulate_tls(family = "binomial", times = c(30, 60, 120, 240, 480),
CTmax = 36, z = 4, tref = 60, seed = 1)
dat <- standardize_data(d, temp = "temp", duration = "duration",
n_total = "total", n_surv = "survived", duration_unit = "minutes")
fit <- fit_4pl(dat, family = "binomial", t_ref = 60,
method = "wald", quiet = TRUE)
plot_tdt_curve(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.