extract_chains: Extract results from MCMC output.

View source: R/cgibbs.R

extract_chainsR Documentation

Extract results from MCMC output.

Description

This function extracts the Julia Object returned by run_mcmc to be usable within R.

Usage

extract_chains(mcmc)

Arguments

mcmc

Object output from run_mcmc.

Value

mu_chains

List with M elements, each element a matrix of dimension iterations x D. mu_chains[[i]] is the MCMC samples for the mean vector of cluster i.

Sigma_chains

List with M elements, each element an array of dimension D x D x iterations. Sigma_chains[[i]] is the MCMC samples for the covariance matrix of cluster i.

prop_chain

Matrix of dimension M x iterations, containing the MCMC samples for the mixing proportions of each class.

z_chain

Matrix of dimension n x iterations, containing the MCMC samples for the class labels of each observation. These labels correspond to the row indices of the matrix of candidate latent classes.

Author(s)

hbk5086@psu.edu


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