Emas.parallel {EMAS}R Documentation

Epigenome-Wide Mediation Analysis Study: Parallel multiple mediation model

Description

This function can perform the parallel multiple mediation model after the Epigenome-Wide Mediation Analysis Study (EMAS).

Usage

Emas.parallel(
  data,
  M.matrix,
  id = "",
  x = "",
  y = "",
  x.cov = c(),
  y.cov = c(),
  m.cov = c(),
  m.cor = TRUE,
  boot = FALSE,
  lavaan = FALSE,
  ...
)

Arguments

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 sem from lavaan package.

Details

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.

Value

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.

Author(s)

Xiuquan Nie, niexiuquan1995@foxmail.com

References

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.

Examples

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)

[Package EMAS version 0.2.2 Index]