View source: R/robust_priors.R
| sceptical_prior | R Documentation |
Generates a sceptical prior that places most mass at or near the null value of the treatment effect, representing a conservative stance for regulatory submissions. Implements the Spiegelhalter-Freedman sceptical prior approach, commonly paired with an enthusiastic prior as a sensitivity-analysis pair in regulatory submissions.
sceptical_prior(
null_value = 0,
family = c("normal", "beta", "lognormal"),
strength = c("moderate", "weak", "strong"),
label = "Treatment effect",
expert_id = "Sceptic"
)
null_value |
Numeric. The null treatment effect. For
|
family |
Character. Distribution family. One of |
strength |
Character. How concentrated the prior is around the null:
|
label |
Character. Description of the quantity. |
expert_id |
Character. Identifier for provenance. |
For a Normal family, the sceptical prior is centred at null_value
with SD calibrated to the strength argument:
weak: SD = 1.0 (vague half-normal)
moderate: SD = 0.5 (2-SD departure from null has ~5% prior probability)
strong: SD = 0.25 (very concentrated at null)
For family = "beta", null_value must be in (0, 1).
A bayprior object tagged with prior_type = "sceptical".
Spiegelhalter, D. J., Freedman, L. S. & Parmar, M. K. B. (1994). Bayesian approaches to randomized trials. JRSS-A, 157, 357-416.
sc <- sceptical_prior(null_value = 0, family = "normal",
strength = "moderate", label = "Mean difference")
print(sc)
plot(sc)
# Beta sceptical prior centred at a null response rate
sc_b <- sceptical_prior(null_value = 0.20, family = "beta",
strength = "moderate", label = "Response rate")
plot(sc_b)
# Lognormal sceptical prior for a hazard ratio: null_value is on the LOG
# scale, so 0 (not 1) represents a null hazard ratio of exp(0) = 1.
sc_hr <- sceptical_prior(null_value = 0, family = "lognormal",
strength = "moderate", label = "Hazard ratio")
print(sc_hr) # mean should be at or near 1, the null hazard ratio
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.