View source: R/dcats_betabin.R
dcats_betabin | R Documentation |
A GLM test with binomial distribution. In order to estimate the variance of the weight, a boostrapping based on the composition similarity is performed.
dcats_betabin( counts1, counts2, similarity_mat = NULL, n_samples = 50, pseudo_count = NULL )
counts1 |
A matrix of compsition sizes (n_rep1, n_cluster) for each replicate in each cluster for codition 1 as case |
counts2 |
A matrix of compsition sizes (n_rep2, n_cluster) for each replicate in each cluster for codition 2 as control |
similarity_mat |
A matrix of floats (n_cluster, n_cluster) for the similarity matrix between cluster group pair. The order of cluster should be consistent with those in 'counts1' and 'counts2' |
n_samples |
An integer for number samples in sampling for estimating the variance of the weights |
pseudo_count |
A pseudo count to add for counts in all cell types. Default NULL means 0 except if a cell type is emplty in one condition, otherwise pseudo_count will be: 0.01 * rowMeans for each condition |
a vector of significance p values for each cluster
K <- 2 totals1 = c(100, 800, 1300, 600) totals2 = c(250, 700, 1100) diri_s1 = rep(1, K) * 20 diri_s2 = rep(1, K) * 20 simil_mat = create_simMat(K, confuse_rate=0.2) sim_dat <- DCATS::simulator_base(totals1, totals2, diri_s1, diri_s2, simil_mat) #dcats_betabin(sim_dat[[1]], sim_dat[[2]], simil_mat, n_samples = 100)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.