Integrate functions m and g when exposure is quantized

integrate_q_g_quant(
  av,
  at,
  covars,
  w_names,
  q_model,
  g_model,
  exposure,
  g_delta,
  m_delta,
  n_bins,
  density_type,
  upper_bound
)

Arguments

av

Validation data

at

Training data

covars

The mediator variable

w_names

Covariate names

q_model

A character vector covariates to adjust for.

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

g_delta

Shift amount applied to A in g model

m_delta

Shift amount applied to A in m model

n_bins

Number of bins in exposure

density_type

Type of density estimation

upper_bound

Upper bound of exposure

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