run_mcmc: Fit constrained normal mixture model via MCMC.

View source: R/cgibbs.R

run_mcmcR Documentation

Fit constrained normal mixture model via MCMC.

Description

This is the fourth and final step of CLIMB. It fits a constrained normal mixture model to the data, given a final list of candidate latent classes and prior hyperparameters.

Usage

run_mcmc(dat, hyp, nstep, retained_classes)

Arguments

dat

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

hyp

Hyperparameters output from get_hyperparameters.

nstep

Integer. Number of MCMC iterations.

retained_classes

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

Details

The proposals for each cluster in the MCMC are adaptively tuned such that the acceptance rates converge to about 0.3

Value

chain

A Julia object. The estimated parameters over the course of nstep iterations

acceptance_rate_chain

an M by nstep matrix of the acceptance rates for each cluster covariance.

tune_df_chain

The tuning degrees of freedom across the chain, adjusted to yield optimal acceptance rates.

Author(s)

hbk5086@psu.edu


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