Simulates longitudinal data based on the iCARH model. Returns two types of datasets with relevant parameters (see below).
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
)number of time points
number of samples (by default first N/2 controls and last N/2 cases)
number of metabolites
number of pathways (will probably change)
number of bacteria profiles (Y variables)
pathways to sample from as specified in KEGG. If not specified, path.probs will be considered.
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.
expected ratio of perturbed pathways
vector of 2xK variables (treatment effect on Y variables)
vector of 2 variables for treatment effect
fixed effect
number of correlated Y variables. The last num.corr.y will be highly correlated to the first num.corr.y variables
beta values (regression coefficients) to sample from. Values will be randomly sampled if not specified.
individual variance of metabolites
autoregressive coefficient for treatment simulation
noise for autoregressive process, recommended value is 0.01
list with the following objects :
metabolomics data, X data
additional omic data, Y data
treatment
effects of Y variables on X variables, column K+1 represents effect of treatment on X variables
pathway adjacency matrices
which pathways are perturbed?
"spatial" dependence parameter, indicative of pathway perturbation
autoregressive coefficients for X data
autoregressive coefficients for Y data
# NOT RUN {
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))
# }
Run the code above in your browser using DataLab