Description Usage Arguments Value Author(s) Examples
This function fits the Two-Condition Gaussian Mixture Model (TCGMM) with penalty. We assume that the latent groups are consistent between two conditions only with shifts in mean parameters.
This function fits the Two-Condition Gaussian Mixture Model (TCGMM). We assume that the latent groups are consistent between two conditions only with shifts in mean parameters.
1 2 3 4 5 6 7 8 9 10 |
y |
A matrix with rows as samples (cells) and columns as features (genes) |
g |
A vector indicating condition 1 (0) and condition 2 (1) |
zInit |
A matrix indicating the assignment of groups with rows as samples and columns as groups |
maxIter |
A numeric value of maximum iteration number. Default is 100. |
thresh |
A numeric value of the converge criteria. Define as the Frobenius norm of the difference of current mean and mean in last iteration. Default is 1e-8. |
verboseN |
A logical value. Whether to print the iteration number. |
type.prop |
A numeric vector specifying fixed type proportions. Default is |
A list with the components:
mu
The mean parameter
sigma
The standard deviation parameter
delta
The shift of mean parameter
z
The assignment of groups
model
The fitted regression model of each group
Dongyuan Song
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | library(extraDistr)
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)
p_int <- c(0.4, 0.3, 0.3)
z_int <- rmnom(n = 100, size = 1, prob = p_int)
fit <- tcGmmPen(dat$y, dat$g, zInit = z_int)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.