Description Usage Arguments Details Value Author(s) Examples
View source: R/AA_CausalMediation.R
CMA examines the intermediate process(Mediation variable:M) by which the independent variable(X) affects the dependent variable(Y). Firstly, building Mediator Model(model.m): f(M | X + AdjVar); and then Outcome Model: f(Y = X + M + AdjVar). Secondly, mediation_out <- mediateY, M, X, AdjVar, model.y, model.m to perform mediation analysis. Finally, extracting the results of mediation_out.
1 | AA_Mediation(dataset=Metadata, XVar="Lysine", YVar="Tryptophan", AdjVar=c("Age", "Gender"), Package="mediation")
|
dataset, |
Matrix; (Required) Metadata. |
XVar, |
Character; independent variable. |
YVar, |
Character; dependent variable. |
MVar, |
Character; mediator. |
AdjVar, |
Character; adjust variable(default: AdjVar=NULL). |
Package, |
Character; (Required) package for CMA (default: Package="mediation"). |
12/5/2021 Guangzhou China
a list of results CMA model Sensitivity analysis of CMA model Table of CMA model
Hua Zou
1 2 3 4 5 6 7 8 9 | data(ExprSetRawRB)
library(Biobase)
Metadata <- pData(ExprSetRawRB)
# mediation package & one mediation
Mediation_res1 <- AA_Mediation(dataset=Metadata, XVar="Lysine", YVar="Tryptophan", AdjVar=c("Age", "Gender"), MVar="BMI", Package="mediation")
# intmed package or two mediation
Mediation_res2 <- AA_Mediation(dataset=Metadata, XVar="Lysine", YVar="Tryptophan", AdjVar=c("Age", "Gender"), MVar=c("BMI", "Age"), Package="intmed")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.