lcmcr: Fit a latent class model

View source: R/lcmcr.R

lcmcrR Documentation

Fit a latent class model

Description

Fit the latent class model of Manrique-Vallier (2016). This function initializes the MCMC chains and sampling is postponed until a call to the estimates() function. By default, 200 independent chains are initialized.

Usage

lcmcr(data, K=10, seeds=1:200, lazy=TRUE, ...)

Arguments

data

object of class "MSEdata" representing list inclusion pattern counts.

K

maximum number of latent classes.

seeds

numeric vector of RNG seeds for the MCMC chains. A chain is initialized for vector element.

lazy

whether or not to wait before initializing the chains with lcmcr objects. Default is TRUE.

...

other parameters passed to the LCMCR::lcmCR() function for each chain.

Examples

lcmcr_fit <- lcmcr(UK, seeds = 1)
estimates(lcmcr_fit, mc.cores = 1)

OlivierBinette/MSETools documentation built on Aug. 7, 2022, 8:42 p.m.