Description Usage Arguments Value Examples
This function
merges identical rows in H: pseudo-cluster —> scientific clusters;
merges partner latent states (identical non-zero columns in H);
merge the corresponding rows in Q by pmax
. Even though identifiability
condition may prevent non-identical columns in H, because we specify
a maximum latent state dimension m_max
, MCMC may produce identical
columns in some iterations.
1 2 3 4 5 6 7 8 9 |
H_star_redun |
A binary matrix of rows |
mylist |
Cluster labels; A vector of length |
t |
The number of non-empty pseudo-clusters |
Q |
The |
VERBOSE |
Default to |
z_pseudo |
Default is |
skip_Q |
Default is |
A list comprised of two elements named:
H_star_merge
and Q_merge
and z_sci
if z_pseudo
is provided.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # the third latent state is inactive among non-empty pseudo-clusters;
# the 2nd and 4th latent states are partners.
# merge 1st and 2nd pseudo-clusters.
H_star_redun <- matrix(c(0,1,0,1,
0,1,0,1,
1,0,0,0,
0,0,0,0,
0,0,0,0,
0,0,0,0,
0,0,0,0),nrow=7,ncol=4,byrow=TRUE)
mylist <- c(1,2,3,5,0,0,0)
t <- 4
Q <- simulate_Q(4,100,p=0.1)
z_pseudo <- c(1,1,3,5,2,2,2,1,3,3,5,1,2,2,1)
# Q is unknown and sampled
merge_H_Q(H_star_redun,mylist,t,Q,TRUE,z_pseudo)
# Q is known:
merge_H_Q(H_star_redun,mylist,t,Q,TRUE,z_pseudo,TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.