unit_information_prior: Unit-Information Prior for continuous outcomes

View source: R/unit_information_prior.R

unit_information_priorR Documentation

Unit-Information Prior for continuous outcomes

Description

Constructs a unit-information (weak) prior from an informative normMix by inflating each component's standard deviation by \sqrt{n_h}.

Usage

unit_information_prior(informative_prior, n_hist)

Arguments

informative_prior

A normMix (from RBesT) built from historical data.

n_hist

Positive integer: historical sample size n_h.

Value

A normMix with inflated standard deviations.

Examples

# Start with an informative prior from historical samples via RBesT::mixfit
set.seed(1000)
fake_hist_draws <- rnorm(300, mean = -3.2, sd = 0.4)
inf_prior <- RBesT::mixfit(fake_hist_draws, type = "norm", Nc = 3)

nf_prior <- unit_information_prior(inf_prior, n_hist = 300)
# Compare SDs before/after
rbind(
  informative_sd  = as.numeric(inf_prior[3, ]),
  unit_info_sd    = as.numeric(nf_prior[3, ])
)

BDIB documentation built on Oct. 18, 2026, 5:08 p.m.