Description Usage Arguments Value Examples
This function combines pseudo-clusters by the current H_star samples.
1 | merge_map(pseudo_pat, uniq_pat)
|
pseudo_pat |
a vector of character strings for binary patterns that might not be unique |
uniq_pat |
a vector of character strings of distinct binary codes |
a list
map
a vector of integer of identical length to pseudo_pat
; takes values
from 1 to length(uniq_pat)
uniq_pat
a matrix of unique binary patterns (number of rows = length(uniq_pat)
,
number of columns = number of 1/0s for each element in uniq_pat
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | #' # 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.
frac = 0.2, # fraction of positive dimensions (L-2M) in Q.
#pop_frac = rep(1/K0,K0) # population prevalences.
#pop_frac = (1:K0)/sum(1:K0) # population prevalences.
pop_frac = c(rep(2,4),rep(1,4)) # population prevalences.
)
#image(simulate_data(options_sim0,SETSEED = TRUE)$datmat)
simu <- simulate_data(options_sim0, SETSEED=TRUE)
tmp <- simu$H_star[c(1,1,2,2,2,3,4,5,6,7,8),]
uid <- unique(apply(tmp,1,paste,collapse=""))
merge_map(apply(tmp,1,paste,collapse=""),uid)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.