Mediate_contY_binaM_bootci: Using bootstrap to calculate the confidence intervals in the...

Description Usage Arguments Value

View source: R/mediateP.R

Description

Using bootstrap to calculate the confidence intervals in the scenario of continuous outcome and binary mediator.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
Mediate_contY_binaM_bootci(
  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),
  R = 1000
)

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

R

The number of replications.

Value

The 95


chaochengstat/mediateP documentation built on Jan. 8, 2021, 3:31 p.m.