Using bootstrap to calculate the confidence intervals in the scenario of continuous outcome and continuous mediator.
Mediate_contY_contM_bootci(
data,
outcome = "Y",
mediator = "M",
exposure = "X",
covariateY = c("X1", "X2"),
covariateM = c("X1", "X2"),
x0 = 0,
x1 = 1,
R = 1000
)
A dataset.
The outcome variable.
The mediator variable.
The exposure variable.
A vector of confounders in the outcome regression.
A vector of confounders in the mediator regression.
The baseline exposure level.
The new exposure level.
The number of replications.
The 95