simulation_dm: simulate data from DM

Description Usage Arguments Value Examples

View source: R/simulate_dm.R

Description

simulate data from DM

Usage

1
simulation_dm(p, seed, N, control_pi, case_pi, control_theta, case_theta)

Arguments

p

the number of taxa

seed

a random seed

N

sample size of each group

control_pi

a probability vector for each taxon which were sum to 1 in control group

case_pi

a probability vector for each taxon which were sum to 1 in case group

control_theta

the over-dispersion parameter

case_theta

the over-dispersion parameter

Value

ntree_table the otu table

Examples

1
2
3
4
5
6
7
set.seed(1)
rand_pi <- runif(20)
control_pi = case_pi = rand_pi/sum(rand_pi)
control_theta = case_theta = 0.1
group <- rep(c(0,1),each =20)
ntree_table <- simulation_dm(p=20,seed=1, N=20,control_pi, case_pi,
control_theta,case_theta)

liudoubletian/eBay documentation built on Oct. 10, 2020, 8:43 p.m.