| make_tdt_priors | R Documentation |
Model-generic twin of make_4pl_priors(). The only prior that depends on
model is the Intercept prior mean of logk: it is shifted by
log(0.25 / slope_factor) so that the implied prior on the slope of the
curve at its midpoint, -k (up - low) * slope_factor, is the same for every
model (slope_factor = 0.25 log-logistic, 0.399 log-normal, 0.347 both
Weibull types). make_4pl_priors() is make_tdt_priors(model = "log-logistic").
make_tdt_priors(
data,
model = "log-logistic",
lower = 0,
upper = 1,
random_effects = NULL,
prior_random_sd = "exponential(2)",
prior_phi = "gamma(2, 0.1)",
bounds = NULL,
ctmax = NULL,
z = NULL,
up = NULL,
low = NULL,
k = NULL,
fix_asymptotes = NULL
)
data |
Output of |
model |
Dose-response curve: |
lower, upper |
Response-scale bounds for the asymptotes. Default
|
random_effects |
Optional character vector of grouping variables for
random intercepts on |
prior_random_sd |
Stan prior string for random-effect SDs. Default
|
prior_phi |
Stan prior string for the beta-binomial precision
parameter |
bounds |
Length-2 numeric |
ctmax, z |
One-sided formulas for the direct parameterisation.
Supplying either switches |
up, low, k |
Optional one-sided formulas for the asymptote and
steepness sub-parameters. In direct mode, when
omitted they inherit the |
fix_asymptotes |
Pin one or both asymptotes instead of estimating
them (default |
A brmsprior object ready to pass to fit_4pl().
raw <- data.frame(
temperature_C = rep(c(30, 32, 34), each = 4),
exposure_h = rep(c(1, 2, 4, 8), times = 3),
n = 30L,
alive = c(29, 28, 25, 5, 30, 27, 18, 2, 28, 22, 10, 1)
)
d <- standardize_data(raw, temp = "temperature_C", duration = "exposure_h",
n_total = "n", n_surv = "alive")
make_tdt_priors(d, model = "weibull1")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.