prior: Specify a Prior Distribution

View source: R/prior.R

priorR Documentation

Specify a Prior Distribution

Description

Creates a prior distribution object for use in Bayesian DSGE estimation.

Usage

prior(distribution, ...)

Arguments

distribution

Character string specifying the distribution family. One of "normal", "beta", "gamma", "uniform", "inv_gamma", "inv_gamma1".

...

Distribution parameters (see Details).

Details

Distribution parameterizations:

normal

mean, sd

beta

shape1, shape2 (alpha, beta parameters)

gamma

shape, rate

uniform

min, max

inv_gamma

shape, scale — density: p(x) \propto x^{-(shape+1)} \exp(-scale/x)

inv_gamma1

s, nu — inverse gamma of type 1, a prior on a standard deviation whose square is inverse gamma (Dynare's inv_gamma_pdf): p(x) \propto x^{-(nu+1)} \exp(-s/(2x^2)). Alternatively give mean and sd (use sd = Inf for an infinite variance) and s, nu are derived as in Dynare.

Value

An object of class "dsge_prior".

Examples

prior("normal", mean = 0, sd = 1)
prior("beta", shape1 = 2, shape2 = 2)
prior("inv_gamma", shape = 0.01, scale = 0.01)
prior("inv_gamma1", mean = 0.1, sd = 2)


dsge documentation built on Sept. 25, 2026, 5:08 p.m.