prior_LSBP: Prior specification for the LSBP model

View source: R/LSBP.R

prior_LSBPR Documentation

Prior specification for the LSBP model

Description

This auxiliary function can be used for specifying the prior hyperparameters in the LSBP_Gibbs, LSBP_ECM, LSBP_VB main functions.

Usage

prior_LSBP(
  p_kernel,
  p_mixing,
  b_kernel = rep(0, p_kernel),
  B_kernel = diag(10^6, p_kernel),
  b_mixing = rep(0, p_mixing),
  B_mixing = diag(10^4, p_mixing),
  a_tau = 0.1,
  b_tau = 0.1
)

Arguments

p_kernel, p_mixing

The dimension of the design matrices for the kernel component and the mixing component, respectively.

b_kernel

A p_kernel dimensional vector representing the prior mean for the Gaussian kernel coefficients.

B_kernel

A p_kernel x p_kernel matrix representing the prior covariance of the Gaussian kernel coefficients.

b_mixing

A p_mixing dimensional vector containing the prior mean of the Gaussian mixing coefficients.

B_mixing

A p_mixing x p_mixing matrix representing the prior covariance of the Gaussian mixing coefficients.

a_tau, b_tau

The hyperparameters of a Gamma prior distribution for the kernel precision.

Value

The function returns a list having the same entries provided as argument. Missing arguments are filled with default values, although this is NOT recommended in general.

Examples

## Not run: 
data(cars)
prior <- prior_LSBP(p_kernel = 1, p_mixing = 2, a_tau = 1.5, b_tau = 1.5)
fit_em <- LSBP_ECM(dist ~ 1 | speed, data = cars, H = 4, prior = prior)

## End(Not run)

tommasorigon/LSBP documentation built on Feb. 25, 2023, 2:47 a.m.