| elicit_weibull | R Documentation |
Fits a Weibull(shape, scale) prior from expert-specified moments or quantiles. The Weibull distribution generalises the Exponential and is widely used for survival analysis with non-constant hazard.
elicit_weibull(
shape = NULL,
scale = NULL,
mean = NULL,
sd = NULL,
quantiles = NULL,
method = c("moments", "params", "quantile"),
expert_id = "Expert",
label = "Quantity"
)
shape |
Numeric > 0. Shape parameter |
scale |
Numeric > 0. Scale parameter |
mean |
Numeric > 0. Prior mean. Used with |
sd |
Numeric > 0. Prior SD. Used with |
quantiles |
Named numeric vector with at least two interior quantiles.
Used when |
method |
Character. One of |
expert_id |
Character. Identifier for the eliciting expert. |
label |
Character. Human-readable label for the quantity. |
Parameterised as in R's stats::dweibull: shape k and
scale \lambda, with mean \lambda \Gamma(1 + 1/k) and
variance \lambda^2 [\Gamma(1 + 2/k) - \Gamma(1 + 1/k)^2].
Shape parameter interpretation:
k < 1: decreasing hazard (e.g. early mortality selecting out)
k = 1: constant hazard (reduces to Exponential)
k > 1: increasing hazard (e.g. ageing, post-surgical)
A bayprior object with dist = "weibull".
# Moment matching: mean 20 months, SD 10 months
p <- elicit_weibull(mean = 20, sd = 10, method = "moments",
label = "Survival time (months)",
expert_id = "Expert_1")
print(p)
plot(p)
# Direct parameters (shape = 2 = increasing hazard)
p2 <- elicit_weibull(shape = 2, scale = 20, method = "params",
label = "PFS (months)")
# Quantile matching (at least 2 required)
p3 <- elicit_weibull(
quantiles = c("0.10" = 5, "0.50" = 18, "0.90" = 40),
method = "quantile",
label = "OS (months)"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.