MBASIC.sim.binary: Simulate data for the MBASIC model with binary states.

Description Usage Arguments Value Author(s) See Also Examples

Description

This function simulates MBASIC model with two states: background or binding. This mimics the standard ChIP-seq experiment.

Usage

1
2
MBASIC.sim.binary(I, fac, J, f, struct = NULL, beta = 0.1, zeta = 0.1,
  beta.non = 0.1, xi = 6, family = "lognormal")

Arguments

I

An integer for the total number of units.

fac

A vector of length N denoting the experimental condition for each replicate.

J

An integer for the number of clusters.

f

Numeric value for the target fold change. Default: 5. See MBASIC.sim for more information.

struct

An K by J integer matrix. The j-th column denotes the levels for the cluster level parameter. See details for more information. Default: NULL.

beta

Hyper parameter for simulating the entries of the W matrix. Each entry in the W matrix follows distribution Beta(beta, beta). Default: 0.1.

zeta

The probability that each unit does not belong to any cluster. Default: 0.1.

beta.non

The hyper parameter for simulating the probability for unclustered units. Default: 0.1.

xi

Parameter for the magnitude of each observations. Default: 6. See MBASIC.sim for more information.

family

A parameter for the family of distribution to be used. Either "lognormal" or "negbin". Default: "lognormal".

Value

A list containing:

Mu0 An N by I matrix. The (n,i)-th entry is the mean of the control experiment for the n-th experiment at unit i.
Y A matrix where each row is the counts for each replicates at all loci.
W A K by J matrix. Each row is the indicators of the loci sets related an individual replicate.
Z An I by J matrix. Each column is the indicator for an individual loci set.
Theta A K by I matrix. The (k,i)-th element is the indicator of whether the i-th unit is binding for condition k.
pi A vector of length J. The j-th entry is the prior probability for each loci to belong to the j-th cluster.
non.id A vector of length I indicating the number of each column not to belong to any cluster.
fac A vector of length N denoting the experimental condition for each replicate.
bkng Mean value of the responses with background state.
snr The ratio between the mean value of the responses with the binding state and the background state.

Author(s)

Chandler Zuo zuo@stat.wisc.edu

See Also

MBASIC.sim

Examples

1
dat.sim <- MBASIC.sim.binary(I = 100, fac = rep(1:5, each = 2), J = 3, f = 5)

chandlerzuo/mbasic documentation built on May 13, 2019, 3:24 p.m.