clm: Conjugate Linear model

Description Usage Arguments Details Value

View source: R/conjugate_samplers.R

Description

Conjugate Linear model

Usage

1
clm(y, X, mu0, Lambda0, a0, b0, calc_ml = TRUE)

Arguments

y

k x 1 vector

X

n x k matrix

mu0

k x 1

Lambda0

k x k

a0

scalar

b0

scalar

calc_lml

if TRUE also returns model evidence (log marginal likelihood)

Details

Model:

y_i ~ N(x_i^T β, σ^2)

β ~ N(μ0, σ^2 Λ0)

σ^2 ~ IG(a0, b0)

from https://en.wikipedia.org/wiki/Bayesian_linear_regression

Value

list with elements muN, LambdaN, aN, bN, lml


jsilve24/driver documentation built on Jan. 30, 2022, 12:07 p.m.