powered by
Creates a Normal-Gamma prior specification for data with unknown mean and variance. This is conjugate for normal observations.
normal_gamma(mu0 = 0, kappa0 = 1, alpha0 = 1, beta0 = 1)
An object of class "regime_prior"
Prior mean for the mean parameter
Prior pseudo-observations for the mean (strength of prior)
Shape parameter for the precision (inverse variance)
Rate parameter for the precision
The Normal-Gamma prior places a joint distribution on (mu, tau) where tau = 1/sigma^2:
tau ~ Gamma(alpha0, beta0) mu | tau ~ Normal(mu0, 1/(kappa0 * tau))
The prior mean of mu is mu0, and the prior mean of sigma^2 is beta0/(alpha0-1) for alpha0 > 1.
prior <- normal_gamma() prior <- normal_gamma(mu0 = 0, kappa0 = 10, alpha0 = 3, beta0 = 2)
Run the code above in your browser using DataLab