| make_4pl_priors | R Documentation |
Priors are weakly informative and do not adapt to the data (which would
understate uncertainty). They are constructed to match
make_4pl_formula()'s disjoint-bounds reparameterisation
low = low_min + inv_logit(lowraw) * low_w and
up = up_min + inv_logit(upraw) * up_w for the asymptote intervals derived
from lower and upper by compute_4pl_bounds().
make_4pl_priors(
data,
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 |
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 |
ctmax, z, up, low, k |
One-sided formulas selecting the direct CTmax/z
priors (matching |
fix_asymptotes |
Pin one or both asymptotes instead of estimating
them (default |
Each of the four 4PL sub-parameters (lowraw, upraw, logk, mid) gets
an Intercept-specific prior plus a general class = "b" prior covering the
temp_c slope. Random-effect SDs on mid get one prior_random_sd row per
grouping variable.
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_4pl_priors(d)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.