Emas | R Documentation |
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,
...
)
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, niexiuquan1995@foxmail.com
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. \Sexpr[results=rd]{tools:::Rd_expr_doi("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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.