integrate_q_g.Rd
Integrate functions m and g using monte carlo method
integrate_q_g(
av,
at,
covars,
w_names,
q_model,
g_model,
exposure,
g_delta,
m_delta,
n_samples,
density_type,
lower_bound,
upper_bound,
integration_method = "MC"
)
Validation data
Training data
The mediator variable
Covariate names
A character
vector covariates to adjust for.
The training data
A numeric
indicating the magnitude of the shift to be
computed for the exposure A
. This is passed to the internal
Shift in exposure in the g model
Shift in exposure in the m model
Number of samples for MC integration
Type of density estimation
Lower bound of exposure
Upper bound of exposure
Type of integration method to use
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).
Does the double integration as described in lemma 1