Sim1: First type of simulation scheme designed in 'superdelta2'...

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/SimuFunctions.R

Description

This function is developed based on R's rnbinom() function. nus = list(nu1, nu2, nu3) are the vectors of mean counts in the three groups. ns = c(n1, n2, n3) are the sample sizes in the three groups. kappa and a are two shape parameters in the NBP model. l and u are the lower and upper bounds (uniform distribution) of simulated sample specific noise.

Usage

1
  Sim1(nus, ns, kappa, a, l, u)

Arguments

nus

nus = list(nu1, nu2, nu3) are the mean parameter vectors of the three groups respectively.

ns

ns = c(n1, n2, n3) are the sample sizes of the three groups respectively.

kappa

The first shape parameter.

a

The second shape parameter.

l

Lower bound of uniform distribution of simulated sample specific noise alpha_j.

u

Upper bound of uniform distribution of simulated sample specific noise alpha_j.

Details

An NBP distribution is an integer-valued distribution with three parameters, the location parameter mu, and two shape parameters kappa and a. The mean and variance of X ~ NBP(mu, kappa, a) are: E(X) = mu Var(X) = mu + mu*kappa^a Note that the NBP distribution describes a nonlinear relationship between the mean and variance of genes. Other technical details of the NBP distribution, such as the probability density function and its relationship with the negative binomial (NB) distribution are not covered here.

Value

This function returns a count matrix Y simulated by the scheme discussed above.

Author(s)

Yuhang Liu, Xing Qiu, Jinfeng Zhang, and Zihan Cui

See Also

SIM1, SIM2, SIM3

Examples

1
2
3
4
5
6
  ngenes <- 5000; n1 <- n2 <- n3 <- 50; ns <- c(n1,n2,n3)
  nu1 <- nu2 <- nu3 <- rep(100, ngenes)
  nu2[1:600] <- 150; nu3[401:1000] <- 75
  nus <- list(nu1, nu2, nu3)
  set.seed(2020)
  SIM1 <- Sim1(nus, ns, kappa = 0.06, a = 2.2, l = 12, u = 30)

fhlsjs/superdelta2 documentation built on Sept. 15, 2020, 12:03 a.m.