Emas {EMAS} | R Documentation |
Epigenome-Wide Mediation Analysis Study
Description
This function can perform the Epigenome-Wide Mediation Analysis Study (EMAS).
Usage
Emas(
data,
M.matrix,
id = "",
x = "",
y = "",
x.cov = c(),
y.cov = c(),
m.cov = c(),
mem.sav = FALSE,
p.th = 0.1,
ini.sims = 100,
boot = FALSE,
cl.n = 1,
...
)
Arguments
data |
A data.frame included id, x, y, x.cov, y.cov, m.cov. |
M.matrix |
A matrix with the epigenome-wide CpG information, maybe a M-value matrix or a beta value matrix. |
id |
Variable name of the id. |
x , y |
Variable name of exposure(x) and outcome(y). |
x.cov |
Variable names of covariates related to exposure(x). |
y.cov |
Variable names of covariates related to outcome(y). |
m.cov |
Variable names of covariates related to mediator(m). |
mem.sav |
A logical value. If 'TRUE', the memory required for the function will decrease, but the speed will also decrease. |
p.th |
Sobel indirect effects P-value threshold for subsequent nonparametric bootstrap or quasi-Bayesian approximation mediation analyses. |
ini.sims |
Initial number of Monte Carlo draws for nonparametric bootstrap or quasi-Bayesian approximation. |
boot |
A logical value. If 'FALSE' a quasi-Bayesian approximation is used for confidence intervals; if 'TRUE' nonparametric bootstrap will be used. Default is 'FALSE'. |
cl.n |
Number of cores used for parallel computing. |
... |
Other arguments passed to |
Details
This function can perform the Epigenome-Wide Mediation Analysis Study (EMAS) to explore the potential mediating CpG sites of exposure variables affecting outcome variables within the epigenome-wide.
Value
Emas
returns a data.frame with the average mediation effects(AME),
average direct effects(ADE), total effects, mediation proportion.
AMEEst: Point estimates for average mediation effects under the exposure conditions.
AMElow95, AMEupp95: 95 percentage confidence intervals for average mediation effects.
AME.P: Two-sided p-values for average mediation effects.
ADEEst: Point estimates for average direct effect under the exposure conditions.
ADElow95, ADEupp95: 95 percentage confidence intervals for average direct effects.
ADE.P: Two-sided p-values for average direct effects.
TotEst: Point estimate for total effect.
Totlow95, Totupp95: 95 percentage confidence interval for total effect.
Tot.P: Two-sided p-values for total effect.
PropEst: The "proportions mediated", or the size of the average mediation effects relative to the total effect.
Author(s)
Xiuquan Nie, niexiuquan1995@foxmail.com
References
Tingley, D., Yamamoto, T., Hirose, K., Imai, K. and Keele, L. (2014). mediation: R package for Causal Mediation Analysis. Journal of Statistical Software, 59(5), 1–38. doi: 10.18637/jss.v059.i05.
Examples
data(data.m)
data(Mvalue)
E.result <- Emas(data.m, Mvalue, id = "ID", x = "x", y = "y",
x.cov = c("age", "gender"),
y.cov = c("age", "gender"),
m.cov = c("age", "gender", "CD8T", "CD4T"),
p.th = 0.1, ini.sims = 100, boot = FALSE, cl.n = 1)