mediate_binaY_contM {mediateP} | R Documentation |
Mediation analysis function for binary outcome and continuous mediator
Description
Mediation analysis function for binary outcome and continuous mediator
Usage
mediate_binaY_contM(
data,
outcome = "Y",
mediator = "M",
exposure = "X",
covariateY = c("X1", "X2"),
covariateM = c("X1", "X2"),
x0 = 0,
x1 = 1,
cY = c(0, 0),
cM = c(0, 0)
)
Arguments
data |
A dataset. |
outcome |
The outcome variable. |
mediator |
The mediator variable. |
exposure |
The exposure variable. |
covariateY |
A vector of confounders in the outcome regression. |
covariateM |
A vector of confounders in the mediator regression. |
x0 |
The baseline exposure level. |
x1 |
The new exposure level. |
cY |
conditional levels of covariateY |
cM |
conditional levels of covariateM |
Value
A list containing NIE, NDE and MP point and interval estimates.
[Package mediateP version 0.2.0 Index]