| check_tls | R Documentation |
check_tls() re-runs the data-adequacy diagnostics
on a fitted profile_tls object, including the two post-fit checks that
fit_tls() cannot run before the model exists: whether any fitted CTmax is
extrapolated beyond the assayed temperatures (item 7), and whether phi has
reached the binomial limit (item 8). Each concern is emitted as a
cli::cli_warn(). Use it to audit a fit, or after suppressWarnings() around
fit_tls().
check_tls(fit)
fit |
A |
The profile-geometry diagnostics (items 9-12) are emitted by confint() and
profile() when those are called, not here, because they require the profile
likelihood.
Invisibly, a character vector of the diagnostic codes that fired.
The warning code returned by check_tls() identifies the next action:
temps: assay at least three distinct temperatures spanning the survival
transition.
durations / durations_per_temp: assay at least three distinct durations
per temperature, with times on both sides of the transition.
no_mortality: extend to hotter or longer exposures until mortality occurs.
all_mortality: add cooler or shorter exposures that retain survivors.
all_left_censored: lower the detection limit or improve assay sensitivity
until at least some responses are observed exactly.
all_left_censored_group: lower the detection limit or improve assay
sensitivity in each listed fitted group until some responses are observed
exactly.
threshold: if absolute LT50 is the target, extend the design so that
observed survival straddles 0.5 within each listed group. The relative
4PL midpoint lies halfway between the fitted lower and upper asymptotes.
up_not_approached / low_not_approached: add milder / harsher conditions
approaching survival 1 / 0, or do not interpret that asymptote.
ctmax_extrapolated: expand the assayed temperature range to bracket CTmax
within each listed group, or report the affected estimates as temperature
extrapolations.
phi_binomial_limit: consider the simpler binomial family.
After changing the design or family, refit and rerun check_tls(). For an
existing data set that cannot be augmented, use the warning to limit the
scientific claim; vignette("profile-likelihood") explains the strict
fallback = FALSE diagnostic. Fixed-effects fits can use a bootstrap fallback;
random-effects fits use Wald intervals when a profile does not close.
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)
codes <- check_tls(fit)
codes # character(0) means no data-adequacy diagnostic fired
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.