Integrate Psi G for the Da part of the EIF for stochastic mediation

integrate_psi_g(
  at,
  av,
  covars,
  w_names,
  q_model,
  r_model,
  g_model,
  exposure,
  mediator,
  delta,
  integration_method,
  n_samples,
  density_type
)

Arguments

at

Training data

av

Validation

covars

Covariates used in the m model

w_names

Covariate used in the g model

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.

integration_method

Type of integration method to be used

n_samples

Number of MC samples for MC integration

density_type

Type of density estimation

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