simu | R Documentation |
Simulate a dataset from log-ratio model.
simu(
n = 100,
p = 200,
model = "linear",
weak = 4,
strong = 6,
weaksize = 0.125,
strongsize = 0.25,
pct.sparsity = 0.5,
rho = 0,
timedep_slope = NULL,
timedep_cor = NULL,
geetype = "gaussian",
m = 4,
corstr = "exchangeable",
sdvec = NULL,
rhogee = 0.8,
geeslope = 2.5,
longitudinal_stability = TRUE,
ncov = 0,
betacov = 0,
intercept = FALSE
)
n |
An integer of sample size |
p |
An integer of number of features (taxa). |
model |
Type of models associated with outcome variable, can be "linear", "binomial", "cox", "finegray", "gee" (scalar outcome with time-dependent features), or "timedep" (survival endpoint with time-dependent features). |
weak |
Number of features with |
strong |
Number of features with |
weaksize |
Actual effect size for |
strongsize |
Actual effect size for |
pct.sparsity |
Percentage of zero counts for each sample. |
rho |
Parameter controlling the correlated structure between taxa. Ranges between 0 and 1. |
timedep_slope |
If |
timedep_cor |
If |
geetype |
If |
m |
If |
corstr |
If |
sdvec |
If |
rhogee |
If |
geeslope |
If |
longitudinal_stability |
If |
ncov |
Number of covariates that are not compositional features. |
betacov |
Coefficients corresponding to the covariates that are not compositional features. |
intercept |
Boolean. If TRUE, then a random intercept will be generated in the model. Only works for |
A list with simulated count matrix xcount
, log1p-transformed count matrix x
, outcome (continuous y
, continuous centered y0
, binary y
, or survival t
, d
), true coefficient vector beta
, list of non-zero features idx
, value of intercept intercept
(if applicable).
Teng Fei. Email: feit1@mskcc.org
Fei T, Funnell T, Waters N, Raj SS et al. Enhanced Feature Selection for Microbiome Data using FLORAL: Scalable Log-ratio Lasso Regression bioRxiv 2023.05.02.538599.
set.seed(23420)
dat <- simu(n=50,p=30,model="linear")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.