latent_allocation {BAMBI} | R Documentation |
Finding latent allocation (component indicators) from an angmcmc object
Description
Finding latent allocation (component indicators) from an angmcmc object
Usage
latent_allocation(object, ...)
Arguments
object |
angular MCMC object. |
... |
passed to pointest to estimate parameters. |
Details
In order to find the latent component indicators, estimates of mixing proportions and model parameters are first computed via pointest. Then, a data point is assigned label j, if the j-th component gives highest density for that point.
Value
Returns a vector of length n, where n is the length (if univariate) or number of rows (if bivariate) of the data used in original fit. i-th entry of the output vector provides component label for the i-th data point.
Examples
# first fit a vmsin mixture model
# illustration only - more iterations needed for convergence
fit.vmsin.20 <- fit_vmsinmix(tim8, ncomp = 3, n.iter = 20,
n.chains = 1)
# now find latent allocation
latent_allocation(fit.vmsin.20)
[Package BAMBI version 2.3.5 Index]