MBASIC.sim.state: Simulate the state matrix for general MBASIC models.

Description Usage Arguments Value Author(s) Examples

Description

Simulate for the Theta matrix

Usage

1
2
MBASIC.sim.state(I, K, J, S = 2, struct = NULL, delta = NULL,
  delta.non = NULL, zeta = 0.1, statemap = NULL)

Arguments

I

An integer for the total number of units.

K

An integer for the number of different experimental conditions.

J

An integer for the number of clusters.

S

An integer for the number of states.

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.

delta

A vector the same length as statemap, or NULL. This is the dirichlet prior parameter to simulate the probability across the components for each CLUSTERED unit and each experiment. If NULL, rep(0.1, length(statemap)) is used.

delta.non

A vector of length S, or NULL. This is the dirichlet prior parameter to simulate the probability across the components for each UNCLUSTERED unit and each experiment. If NULL, rep(0.1, length(statemap)) is used.

zeta

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

statemap

A vector consisted of 1, 2, ..., S, representing which state each component belongs to. Default: NULL.

Value

A list containing:

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.
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.
delta Same as the input argument delta.
zeta Same as the input argumnent zeta.
non.id A vector of length I indicating the number of each unit not to belong to any cluster.

Author(s)

Chandler Zuo zuo@stat.wisc.edu

Examples

1
dat.sim <- MBASIC.sim.state(I = 100, K = 10, J = 3)

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