Function to estimate propensity score

estimate_G(
  A,
  W,
  DeltaY,
  DeltaA,
  SL_g,
  glm_g,
  a_0,
  tolg,
  stratify = FALSE,
  validRows = NULL,
  verbose = FALSE,
  returnModels = FALSE,
  Qn = NULL,
  adapt_g = FALSE
)

Arguments

A

A vector of binary treatment assignment (assumed to be equal to 0 or 1)

W

A data.frame of named covariates

DeltaY

Indicator of missing outcome (assumed to be equal to 0 if missing 1 if observed)

DeltaA

Indicator of missing treatment (assumed to be equal to 0 if missing 1 if observed)

SL_g

A vector of characters describing the super learner library to be used for each of the regression (DeltaA, A, and DeltaY). To use the same regression for each of the regressions (or if there is no missing data in A nor Y), a single library may be input.

glm_g

A character describing a formula to be used in the call to glm for the propensity score.

a_0

A vector of fixed treatment values at which to return marginal mean estimates.

tolg

A numeric indicating the minimum value for estimates of the propensity score.

stratify

A boolean indicating whether to estimate the missing outcome regression separately for observations with A equal to 0/1 (if TRUE) or to pool across A (if FALSE).

validRows

A list of length cvFolds containing the row indexes of observations to include in validation fold.

verbose

A boolean indicating whether to print status updates.

returnModels

A boolean indicating whether to return model fits for the outcome regression, propensity score, and reduced-dimension regressions.

Qn

A list of estimates of the outcome regression for each value in a_0. Only needed if adapt_g = TRUE.

adapt_g

A boolean indicating whether propensity score is adaptive to outcome regression.