R: Conveniently Format Data for Bayesian Latent Class
data.blca
R Documentation
Conveniently Format Data for Bayesian Latent Class
Description
Conveniently format data for use with blca.
Usage
data.blca(X)
Arguments
X
A data matrix intended for latent class analysis. See details.
Details
The data may take of one of two forms, either as a binary matrix, or as a matrix consisting of unique binary rows, with a column of counts. In either case data.blca will convert X into a list, with binary matrix and count vector explicitly identified.
Value
A list of class data.blca, containing
counts.n
A vector of counts of each unique data entry.
data
A matrix consisting of each unique data entry.
Note
This function is used internally by blca, so its use is not necessary, though it will speed up computation time to supply the model with data of this form if repeated use of a function is required.