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 makeCluster.

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.

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)

[Package EMAS version 0.2.2 Index]