Integrate Psi G for the Da part of the EIF for stochastic mediation when A is quartiles

integrate_psi_g_discrete(
  av,
  at,
  covars,
  w_names,
  q_model,
  r_model,
  g_model,
  exposure,
  mediator,
  delta,
  n_bins,
  n_samples = 1000,
  method = "MC",
  mediator_quantized,
  density_type,
  upper_bound,
  use_multinomial
)

Arguments

av

Validation data

at

Training data

covars

Covars for the outcome regression model

w_names

w_names for A|W

q_model

A character vector covariates to adjust for.

r_model

Mediator density estimator

g_model

The training data

exposure

A numeric indicating the magnitude of the shift to be computed for the exposure A. This is passed to the internal

mediator

The mediator variable name shift_additive and is currently limited to additive shifts.

delta

Object containing a set of instantiated learners from the sl3, to be used in fitting an ensemble model.

n_bins

Number of bins exposure is discretrized

n_samples

Number of samples used in MC integration

method

Integration method

mediator_quantized

If mediator is discretized

density_type

Type of density estimation

upper_bound

Upper bound of exposure

use_multinomial

if multinomial is used

Value

A data.table with two columns, containing estimates of the outcome mechanism at the natural value of the exposure Q(A, W) and an upshift of the exposure Q(A + delta, W)

Details

Does the double integration as described in lemma 1