get_hyperparameters: Get prior hyperparameters for MCMC.

View source: R/main_wrappers.R

get_hyperparametersR Documentation

Get prior hyperparameters for MCMC.

Description

This is the fourth and final step of CLIMB. For a list of candidate latent classes, this function computes all necessary prior hyperparameters for the Bayesian analysis of the constrained normal mixture model.

Usage

get_hyperparameters(z, fits, reduced_classes, prior_weights)

Arguments

z

n by D matrix or data frame of appropriately pre-processed observations.

fits

Output from get_pairwise_fits

reduced_classes

Final list of candidate latent classes, after eliminating classes whose prior weights are too small.

prior_weights

Prior weights for a given delta, as output from get_prior_weights

Value

Psi0

D by D by M array of prior cluster covariance matrices.

mu0

M by D matrix of prior cluster means.

alpha

M-vector of prior cluster mixing weights.

kappa0

alpha * n – this controls the informativity of the prior, and can be changed by the user.

Author(s)

hbk5086@psu.edu

Examples

data(sim)
data(fits)
data(true_association)
p <- rep(1/nrow(true_assoc), times = nrow(true_assoc))
hyp <- get_hyperparameters(sim$data, fits, true_assoc, p)

hillarykoch/CLIMB documentation built on Oct. 24, 2022, 4:27 a.m.