Description Usage Arguments Value Examples
This is a wrapper of the simulateDatExpr
function which simulates data in a modular structure (i.e. in blocks). This
function simulates data in 5 blocks referred to as Turquoise, Blue, Red,
Green and Yellow, separately for exposed (E=1) and unexposed (E=0)
observations.
1 |
n |
number of observations |
p |
total number of predictors to simulate |
rho |
numeric value representing the expected correlation between green module and red module |
exposed |
binary numeric vector of length |
... |
arguments passed to the |
n x p
matrix of simulated data
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | library(magrittr)
p <- 1000
n <- 200
d0 <- s_modules(n = 100, p = 1000, rho = 0, exposed = FALSE,
modProportions = c(0.15,0.15,0.15,0.15,0.15,0.25),
minCor = 0.01,
maxCor = 1,
corPower = 1,
propNegativeCor = 0.3,
backgroundNoise = 0.5,
signed = FALSE,
leaveOut = 1:4)
d1 <- s_modules(n = 100, p = 1000, rho = 0.90, exposed = TRUE,
modProportions = c(0.15,0.15,0.15,0.15,0.15,0.25),
minCor = 0.4,
maxCor = 1,
corPower = 0.3,
propNegativeCor = 0.3,
backgroundNoise = 0.5,
signed = FALSE)
X <- rbind(d0$datExpr, d1$datExpr) %>%
magrittr::set_colnames(paste0("Gene", 1:p)) %>%
magrittr::set_rownames(paste0("Subject",1:n))
dim(X)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.