sim.groups: Dirichlet-multinomial case/control counts simulation

Description Usage Arguments Details Value See Also Examples

Description

Simulates counts according to a Dirichlet-multinomial model, according to model parameters given by object dm.fit.

Usage

1
2
sim.groups(dm.fit, Nshuffle = 15, params = list(mu1 = 300, sd1 = 50, N1 =
  20, mu2 = 300, sd2 = 50, N2 = 20))

Arguments

dm.fit

dirmult object. Alternatively, a list object with at least gamma object, corresponding to parameters of a Dirichlet distribution

Nshuffle

number of features to shuffle

params

list of parameters describing the number the mean and standard deviation of library sizes for case and control samples, as well as the number of samples of each

Details

Simulates two sets of counts (case/control), where one set is generated according to the parameters in object dm.fit, and and the second set is generated such that Nshuffle number of high abundance features are shuffled with Nshuffle number of low abundance features, generating a final data set with a large number of differences between case and control samples for large enough Nshuffle. Requires package dirmult to generate samples.

Value

List with objects counts, i.spike, groups: a counts table, feature names which have been shuffled, and group membership (case/control), respectively

See Also

sim.counts for simulation of a single group of samples

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
   library(HMP)
   library(dirmult)
   S <- sim.groups(dm.fit.eso)
   S$eb <- eb.pseudo(S$counts)
   S$gt <- gt.pseudo(S$counts)
   round(head(S$eb),4)

   S <- sim.groups(dm.fit.lung, Nshuffle = 50,
        params = list(mu1 = 2000, sd1 = 200, N1 = 20,
                      mu2 = 6000, sd2 = 600, N2 = 20))
   S$eb <- eb.pseudo(S$counts)
   S$gt <- gt.pseudo(S$counts)
   round(head(S$gt),4)

ldiao/Gimp documentation built on May 20, 2019, 11:29 p.m.