Hypothesis test of direct effect with mediated stochastic interventions using the multiplier bootstrap

test_de(W, A, Z, Y, ids = seq(1, length(Y)), delta_grid = seq(from = 0.5,
  to = 5, by = 0.9), mult_type = c("rademacher", "gaussian"),
  ci_level = 0.95, g_learners, e_learners, m_learners, phi_learners,
  cv_folds = 10, n_mult = 10000)

Arguments

W

A matrix, data.frame, or similar corresponding to a set of baseline covariates.

A

A numeric vector corresponding to a treatment variable. The parameter of interest is defined as a location shift of this quantity.

Z

A numeric vector, matrix, data.frame, or similar corresponding to a set of mediators (on the causal pathway between the intervention A and the outcome Y).

Y

A numeric vector corresponding to an outcome variable.

ids

A numeric vector of observation-level IDs, allowing for observational units to be related through a hierarchical structure. The default is to assume all units are IID. When repeated IDs are included, both the cross-validation procedures used for estimation and inferential procedures respect these IDs.

delta_grid

A numeric of values giving the varous degrees of shift in the intervention to be used in defining the causal quantity of interest. In the case of binary interventions, this takes the form of an incremental propensity score shift, acting as a multiplier of the odds with which a given observational unit receives the intervention (EH Kennedy, 2018, JASA; doi:10.1080/01621459.2017.1422737).

mult_type

A character identifying the type of multipliers to be used in the multiplier bootstrap. Choices are "rademacher" or "gaussian", with the default being the former.

ci_level

A numeric indicating the (1 - alpha) level of the simultaneous confidence band to be computed around the estimates of the direct effect. The error level of the test reported in the p-value returned is simply alpha, i.e., one less this quantity.

g_learners

A Stack (or other learner class that inherits from Lrnr_base), containing a single or set of instantiated learners from sl3, to be used in fitting the propensity score, i.e., g = P(A | W).

e_learners

A Stack (or other learner class that inherits from Lrnr_base), containing a single or set of instantiated learners from sl3, to be used in fitting a propensity score that conditions on the mediators, i.e., e = P(A | Z, W).

m_learners

A Stack (or other learner class that inherits from Lrnr_base), containing a single or set of instantiated learners from sl3, to be used in fitting the outcome regression, i.e., m(A, Z, W).

phi_learners

A Stack (or other learner class that inherits from Lrnr_base), containing a single or set of instantiated learners from sl3, to be used in a regression of a pseudo-outcome on the baseline covariates, i.e., phi(W) = E[m(A = 1, Z, W) - m(A = 0, Z, W) | W).

cv_folds

A numeric specifying the number of folds to be created for cross-validation. Use of cross-validation / cross-fitting allows for entropy conditions on the AIPW estimator to be relaxed. Note: for compatibility with make_folds, this value must be greater than or equal to 2; the default is to create 10 folds.

n_mult

A numeric scalar giving the number of repetitions of the multipliers to be used in computing the multiplier bootstrap.