Description Usage Arguments Value
This function updates Q matrix by Gibbs sampler (with option to do constrained updates within the identifiability constraint). Only used when Q is not known. NB: - do we need M here? do we modify M after collapsing partner machines. - need to speed up.
1 |
Y |
binary data matrix |
Q_old |
the Q matrix from the last scan in Gibbs sampler (of dimension M by L) |
H |
matrix of latent state profiles, rows for N subjects, columns for M latent states |
z |
a vector of individual cluster indicators |
t |
the number of clusters at a particular iteration |
mylist |
the ordered list that keeps the cluster ids in increasing order |
p |
Latent state prevalences; a vector of length identical to the columns of H. |
theta, psi |
True and false positive rates. Both are vectors of length L |
constrained |
Default to FALSE; Set to TRUE if doing constrained Gibbs sampling within identifiability constraints. |
A Q matrix with all its elements updated.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.