integrate_psi_g_cont.Rd
Integrate Psi G for the Da part of the EIF for stochastic mediation using Monte Carlo integration
integrate_psi_g_cont(
av,
at,
covars,
w_names,
q_model,
r_model,
g_model,
exposure,
mediator,
delta,
n_samples,
density_type,
integration_method
)
A dataframe with the natural value of the exposure
A dataframe with the upshift of the exposure
A vector of covariate names
A vector of covariate names
A fitted Q-model
A fitted R-model (mediator density estimator)
A fitted G-model (the training data)
A string indicating the name of the exposure variable
A string indicating the name of the mediator variable
A numeric indicating the magnitude of the shift for the exposure
A numeric specifying the number of samples for Monte Carlo integration
A string specifying the type of density estimation ("sl" for Super Learner)
A string specifying the integration method to use ("MC" for Monte Carlo, "AQ" for Adaptive Quadrature)
A list with three elements: "d_a" containing the estimates of Da, "phi_aw" containing the estimates of the outcome mechanism at the natural value of the exposure Q(A, W), and "phi_aw_g" containing the estimates of the outcome mechanism at the upshift of the exposure Q(A + delta, W)
Computes the double integration as described in lemma 1 using either Monte Carlo or adaptive quadrature methods.