priors: Declare priors for Bayesian estimation

View source: R/priors.R

priorsR Documentation

Declare priors for Bayesian estimation

Description

One named argument per estimated quantity: a structural parameter name or a shock name (meaning that shock's standard deviation). Everything without a prior stays calibrated.

Usage

priors(...)

Arguments

...

Named prior declarations, e.g. ⁠b1 = beta(0.7, 0.1), c2 = truncate(normal(1.5, 0.25), lower = 1)⁠.

Details

Available distributions (usable only inside priors(), so base R's beta() and gamma() functions are never masked):

  • normal(mean, sd)

  • beta(mean, sd) — on (0, 1), mean/sd parametrization

  • gamma(mean, sd) — on (0, Inf)

  • invgamma(mean, sd) — on (0, Inf); the usual choice for shock sds

  • uniform(min, max)

  • truncate(d, lower, upper) — restrict any of the above; the normalizing constant is dropped (harmless for modes and MCMC)

Value

An object of class qpm_priors.

Examples

p <- priors(
  b1 = beta(0.7, 0.1),
  b2 = gamma(0.25, 0.1),
  c2 = truncate(normal(1.5, 0.25), lower = 1),
  eps_pi = invgamma(1, 0.3)
)
p

qpmR documentation built on Sept. 29, 2026, 5:10 p.m.