integrand_q_r.Rd
Computes the integrand for mediation analysis in InterXshift by combining the models for outcome given mediator and exposure (q_model), and the density of the mediator given exposure and covariates (r_model).
integrand_q_r(
z,
row_data,
covars,
w_names,
q_model,
r_model,
exposure,
mediator,
delta,
upper_a,
density_type
)
Numeric vector, grid points for the mediator.
Data frame, containing the data for a single observation.
Character vector, names of the covariate columns in the data.
Character vector, names of the baseline covariate columns in the data.
Fitted Super Learner model, the outcome model given mediator and exposure.
Fitted Super Learner or parametric model, the mediator density given exposure and covariates.
Character, name of the exposure variable in the data.
Character, name of the mediator variable in the data.
Numeric, the amount to shift the exposure variable.
Numeric, the upper bound for the exposure variable.
Character, either "sl" for Super Learner or "parametric" for parametric models.
Numeric vector, the computed values of the integrand.