Estimate the Exposure Mechanism via Generalized Propensity Score for Two Exposure Variable

joint_stoch_shift_est_g_exp(
  exposures,
  deltas,
  g_learner,
  covars,
  av,
  at,
  hn_trunc_thresh,
  outcome_type
)

Arguments

exposures

A vector of characters labeling the exposure variables.

deltas

A numeric value identifying a shift in the observed value of the exposure under which observations are to be evaluated.

g_learner

Object containing a set of instantiated learners from sl3, to be used in fitting an ensemble model.

covars

A character labeling the covariate variables

av

A dataframe of validation data specific to the fold

at

A dataframe of training data specific to the fold

hn_trunc_thresh

Truncation level of the clever covariate used in the adaptive delta method

outcome_type

Type of outcome variable

adaptive_delta

Whether to adaptively change the delta based on positivity determined from the clever covariate being below the hn_trunc_thresh level

use_multinomial

TRUE/FALSE for using multinomial for discretized exposure

Value

A data.table with four columns, containing estimates of the generalized propensity score at a downshift (g(A - delta | W)), no shift (g(A | W)), an upshift (g(A + delta) | W), and an upshift of magnitude two (g(A + 2 delta) | W).

Details

Compute the propensity score (exposure mechanism) for the observed data, including the shift. This gives the propensity score for the observed data (at the observed A) the counterfactual shifted exposure levels (at A - delta, A + delta, and A + 2 * delta).