Skip to contents

Creates the conjugate Normal-Inverse-Wishart prior for the mean vector \(\mu\) and covariance matrix \(\Sigma\) of a bivariate normal endpoint in one group: $$\mu \mid \Sigma \sim N_2(\mu_0, \Sigma / \kappa_0), \quad \Sigma \sim \textrm{Inv-Wishart}(\nu_0, \Lambda_0).$$

Usage

prior_niw(mu0, kappa0, nu0, Lambda0)

Arguments

mu0

Numeric vector of length 2, the prior mean of \(\mu\).

kappa0

Positive prior sample size for \(\mu\).

nu0

Prior degrees of freedom of the inverse Wishart distribution; must be greater than 1.

Lambda0

A 2 x 2 symmetric positive definite scale matrix.

Value

An object of class c("qdm_prior_niw", "qdm_prior") with elements mu0, kappa0, nu0 and Lambda0.

Examples

prior_niw(mu0 = c(0, 0), kappa0 = 1, nu0 = 4, Lambda0 = diag(2))
#> Prior: N-Inv-Wishart(mu0 = (0, 0), kappa0 = 1, nu0 = 4, Lambda0 = (1, 0; 0, 1))