Description Usage Arguments Details Value Note Author(s) See Also Examples
Conveniently format data for use with blca
.
1 | data.blca(X)
|
X |
A data matrix intended for latent class analysis. See 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.
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. |
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.
Arthur White
1 2 3 4 5 |
Loading required package: e1071
Loading required package: coda
$counts.n
0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111
31 49 59 150 66 23 28 50 70 22 21 49 232 63 49 38
$data
[,1] [,2] [,3] [,4]
[1,] 0 0 0 0
[2,] 0 0 0 1
[3,] 0 0 1 0
[4,] 0 0 1 1
[5,] 0 1 0 0
[6,] 0 1 0 1
[7,] 0 1 1 0
[8,] 0 1 1 1
[9,] 1 0 0 0
[10,] 1 0 0 1
[11,] 1 0 1 0
[12,] 1 0 1 1
[13,] 1 1 0 0
[14,] 1 1 0 1
[15,] 1 1 1 0
[16,] 1 1 1 1
attr(,"class")
[1] "data.blca"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.