Description Usage Arguments Value Author(s) Examples
This function generates multivariate Gaussian distributed data under case/control conditions. The basic assumption is that for each type, the mean has a shift while the variance keeps the same cross conditions.
1 2 3 4 5 6 7 8 9 10 | simGen(
n,
n.feature,
n.group,
type.prop,
con.prop = 0.5,
mu.mat,
sigma.mat,
delta.mat
)
|
n |
The sample size of simulated data (cells) |
n.feature |
Number of features (genes) |
n.group |
Number of underlying groups (cell types) |
type.prop |
A vector of same length as |
con.prop |
Proportion of condition 1. Default is 0.5. |
mu.mat |
A matrix which is |
sigma.mat |
A matrix which is |
delta.mat |
A matrix which is |
A list which contains the data, the group type and the condition. ## y The feature of each data point ## z The group type of each data point ## g The condtion (condition1 / condition 2) of each data point
Dongyuan Song
1 2 3 4 5 6 7 8 9 10 11 | mu1 <- c(5, 7, 9)
theta1 <- c(1, 2, 0)
sigma1 <- c(1, 2, 3)
mu2 <- c(10, 15, 4)
theta2 <- c(1, 2, 6)
sigma2 <- c(0.4, 0.2, 0.4)
mu.mat <- cbind(mu1, mu2)
delta.mat <- cbind(theta1, theta2)
sigma.mat <- cbind(sigma1, sigma2)
dat <- simGen(n = 100, n.feature = 2, n.group = 3, type.prop = c(0.2, 0.3, 0.5),
mu.mat = mu.mat, sigma.mat = sigma.mat, delta.mat = delta.mat)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.