iCARH.simulate {iCARH} | R Documentation |
Simulates longitudinal data based on the iCARH model.
Description
Simulates longitudinal data based on the iCARH model. Returns two types of datasets with relevant parameters (see below).
Usage
iCARH.simulate(
Tp,
N,
J,
P,
K,
path.names = NULL,
path.probs = FALSE,
pathway.perturb.ratio = 0.5,
Ygroupeff = NULL,
Zgroupeff = NULL,
fe = 0,
num.corr.y = 0,
beta.val = NULL,
sigma2 = 1,
arz = 0.7,
sdx = 0.01
)
Arguments
Tp |
number of time points |
N |
number of samples (by default first N/2 controls and last N/2 cases) |
J |
number of metabolites |
P |
number of pathways (will probably change) |
K |
number of bacteria profiles (Y variables) |
path.names |
pathways to sample from as specified in KEGG. If not specified, path.probs will be considered. |
path.probs |
if TRUE, KEGG like density of pathways per metabolite is used to sample from. If scalar, path.probs is the expected ratio of metabolites in each pathway. Needs to be specified if path.names is not. |
pathway.perturb.ratio |
expected ratio of perturbed pathways |
Ygroupeff |
vector of 2xK variables (treatment effect on Y variables) |
Zgroupeff |
vector of 2 variables for treatment effect |
fe |
fixed effect |
num.corr.y |
number of correlated Y variables. The last num.corr.y will be highly correlated to the first num.corr.y variables |
beta.val |
beta values (regression coefficients) to sample from. Values will be randomly sampled if not specified. |
sigma2 |
individual variance of metabolites |
arz |
autoregressive coefficient for treatment simulation |
sdx |
noise for autoregressive process, recommended value is 0.01 |
Value
list with the following objects :
XX |
metabolomics data, X data |
Y |
additional omic data, Y data |
Z |
treatment |
beta |
effects of Y variables on X variables, column K+1 represents effect of treatment on X variables |
pathways |
pathway adjacency matrices |
path.perturb |
which pathways are perturbed? |
phi |
"spatial" dependence parameter, indicative of pathway perturbation |
arx |
autoregressive coefficients for X data |
ary |
autoregressive coefficients for Y data |
Examples
data.sim = iCARH.simulate(4, 8, 10, 2, 2, path.probs=0.3, Zgroupeff=c(0,4),
beta.val=c(1,-1,0.5, -0.5))