Description Usage Arguments Value Examples
This function initializes Q (if unknown) during MCMC sampling chain within identifiability constraints. It is a warm start  because it will not assign an "1" to dimension "l" with few ones in the data. NB: harder to get 1 to zero? easy to get zero to one?
1  simulate_Q_dat(M, dat, p = 0.1, frac = 1/4)

M 
latent state dimension 
dat 
binary data matrix (rows for observations, columns for dimensions) 
p 
Bernoulli probability of 1 in the Q matrix (except two diagonal matrices) 
frac 
A threshold  this function only initializes the dimensions with at least

a binary matrix of dimension M by L
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  # simulate data:
L0 < 100
options_sim0 < list(N = 200, # sample size.
M = 3, # true number of machines.
L = L0, # number of antibody landmarks.
K = 8, # number of true components.,
theta = rep(0.8,L0), # true positive rates
psi = rep(0.01,L0), # false positive rates
alpha1 = 1 # half of the people have the first machine.
)
#image(simulate_data(options_sim0,SETSEED = TRUE)$datmat)
simu < simulate_data(options_sim0, SETSEED=TRUE)
simu_dat < simu$datmat
simulate_Q_dat(5,simu_dat)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.