View source: R/all_postprodn_fns.R
latent_allocation | R Documentation |
Finding latent allocation (component indicators) from an angmcmc object
latent_allocation(object, ...)
object |
angular MCMC object. |
... |
passed to pointest to estimate parameters. |
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.
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.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.