Whether The Effect Of X On Y Is Mediated Through M
Use mediation when the question is whether an exposure-outcome association operates through an intermediate variable.
- exposure:
X - mediator:
M - outcome:
Y
med <- associate$mediation(
data,
exposure = PRS,
mediator = braaksc,
outcome = demented,
covariates = c(age, sex, PCA)
)What comes back
A PolyGeniusAssociations object using the mediation schema: total, direct, indirect, and proportion-mediated rows where appropriate.
Plotting
Mediation-specific summaries and forest-style effect views. Detailed plotting is under construction.