N: Normal Prior

View source: R/bage_prior-constructors.R

NR Documentation

Normal Prior

Description

Use independent draws from a normal distribution to model a main effect or interaction. Typically used with variables other than age or time, such as region or ethnicity, where there is no natural ordering.

Usage

N(s = 1)

Arguments

s

Scale for the standard deviation. Default is 1.

Details

Argument s controls the size of errors. Smaller values for s tend to give more tightly clustered estimates.

Value

An object of class "bage_prior_norm".

Mathematical details

\beta_j \sim \text{N}(0, \tau^2)

where \beta is the main effect or interaction.

Parameter \tau has a half-normal prior

\tau \sim \text{N}^+(0, \mathtt{s}^2),

where s is provided by the user.

See Also

  • NFix() Similar to N() but standard deviation parameter is supplied rather than estimated from data

  • priors Overview of priors implemented in bage

  • set_prior() Specify prior for intercept, main effect, or interaction

Examples

N()
N(s = 0.5)

bage documentation built on April 3, 2025, 8:53 p.m.