| Title: | Epigenome-Wide Mediation Analysis Study |
|---|---|
| Description: | DNA methylation is essential for human, and environment can change the DNA methylation and affect body status. Epigenome-Wide Mediation Analysis Study (EMAS) can find potential mediator CpG sites between exposure (x) and outcome (y) in epigenome-wide. For more information on the methods we used, please see the following references: Tingley, D. (2014) <doi:10.18637/jss.v059.i05>, Turner, S. D. (2018) <doi:10.21105/joss.00731>, Rosseel, D. (2012) <doi:10.18637/jss.v048.i02>. |
| Authors: | Xiuquan Nie [aut, cph, cre], Mengyi Wang [ctb, rev] |
| Maintainer: | Xiuquan Nie <[email protected]> |
| License: | GPL-3 |
| Version: | 0.2.4 |
| Built: | 2026-05-20 08:31:26 UTC |
| Source: | https://github.com/cran/EMAS |
A data for 221 participants. The data were fabricated.
data.mdata.m
A data.frame contains 221 obs of 7 variables. The variables are:
The ID of these 221 people.
A numeric.
A two level factor: "1" or "2"
A numeric.
A numeric.
A numeric.
A numeric.
Emas results data.An Emas results data for 2000 CpGs. The data were fabricated.
E.resultE.result
A data.frame produced by Emas contains 2000 obs of 13 variables.
This function can perform the Epigenome-Wide Mediation Analysis Study (EMAS).
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, ... )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, ... )
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 |
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.
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. |
Xiuquan Nie, [email protected]
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.
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)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)
This function can perform the parallel multiple mediation model after the Epigenome-Wide Mediation Analysis Study (EMAS).
Emas.parallel( data, M.matrix, id = "", x = "", y = "", x.cov = c(), y.cov = c(), m.cov = c(), m.cor = TRUE, boot = FALSE, lavaan = FALSE, ... )Emas.parallel( data, M.matrix, id = "", x = "", y = "", x.cov = c(), y.cov = c(), m.cov = c(), m.cor = TRUE, boot = FALSE, lavaan = FALSE, ... )
data |
A data.frame included id, x, y, x.cov, y.cov, m.cov. |
M.matrix |
A matrix with the CpG information screened from EMAS., 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). |
m.cor |
A logical value. If 'TRUE', the mediators in the parallel multiple mediation model are set to correlate with each other. |
boot |
A logical value or a numeric value. If a numeric value, the number for bootstrap. |
lavaan |
A logical value. If 'TRUE', a lavaan object will be given. |
... |
Other arguments passed to |
This function can perform the parallel multiple mediation model after the Epigenome-Wide Mediation Analysis Study (EMAS) to further explore the potential parallel mediating CpG sites of exposure variables affecting outcome variables.
Emas.parallel returns a data.frame with the average mediation effects(AME),
average direct effects(ADE), and total effects(Tot). If lavaan is 'TRUE', a lavaan object will be given.
Xiuquan Nie, [email protected]
Rosseel, Y. (2012). lavaan: An R Package for Structural Equation Modeling. Journal of Statistical Software, 48(2), 1–36. doi:10.18637/jss.v048.i02.
data(data.m) data(Mvalue) EP.result <- Emas.parallel(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"), m.cor = TRUE, boot = FALSE, lavaan = FALSE)data(data.m) data(Mvalue) EP.result <- Emas.parallel(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"), m.cor = TRUE, boot = FALSE, lavaan = FALSE)
Function to plot a volcano plot from the Emas results.
EMAS.volcano( E.result, epiwideline = -log10(1e-07), suggestiveline = -log10(1e-05) )EMAS.volcano( E.result, epiwideline = -log10(1e-07), suggestiveline = -log10(1e-05) )
E.result |
A data.frame produced by |
epiwideline |
Where to draw a "epigenome-wide sigificant" line. Default -log10(1.0e-7). |
suggestiveline |
Where to draw a "suggestive" line. Default -log10(1.0e-5). Set to FALSE to disable. |
This function can plot a volcano plot from the Emas results.
No return value, called for side effects.
Xiuquan Nie, [email protected]
data(E.result) EMAS.volcano(E.result, epiwideline = -log10(0.05/2000), suggestiveline = -log10(1/100))data(E.result) EMAS.volcano(E.result, epiwideline = -log10(0.05/2000), suggestiveline = -log10(1/100))
A M-value matrix for 221 participants. The data were fabricated.
MvalueMvalue
A matrix contains 221 obs of 10 CpGs.