Integrand function for q and g models

integrand_q_g(
  sample_a,
  row_data,
  covars,
  w_names,
  q_model,
  g_model,
  exposure,
  g_delta,
  m_delta,
  upper_bound,
  density_type
)

Arguments

sample_a

vector of sampled exposure values

row_data

dataframe containing the current row data

covars

vector of covariate names for outcome regression

w_names

Names of covariates

q_model

sl3 learner object for the q model

g_model

sl3 learner object for the g model

exposure

character string indicating the exposure variable name

g_delta

numeric value for the g model delta

m_delta

numeric value for the m model delta

upper_bound

numeric value specifying the upper bound for exposure values

density_type

character string specifying the density type ("sl" or other)

Value

output numeric vector of integrand values