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,
  adaptive_delta,
  hn_trunc_thresh,
  use_multinomial,
  density_type,
  max_degree,
  n_bins,
  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

adaptive_delta

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

hn_trunc_thresh

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

use_multinomial

TRUE/FALSE for using multinomial for discretized exposure

density_type

Type of density estimator used

max_degree

Max degree of interaction used in the haldensify fit, if used.

n_bins

Number of bins to discretize outcome for haldensify if used.

outcome_type

Type of outcome variable

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).