EYgstar: Estimation of E[Ygstar]

View source: R/5valueodtr.R

EYgstarR Documentation

Estimation of E[Ygstar]

Description

Given a W, A, Y dataset, this function will compute the estimated ODTR using SuperLearner. If a Qbar function is provided that computes the true E[Y|A,W] (e.g., if simulating), the function will also return the true treatment under the optimal rule and other metrics of evaluating the estimated optimal rule's performance. Then, it will estimate E[Ygstar] using g-computation, IPTW, IPTW-DR, TMLE, and CV-TMLE. Follows the framework of Luedtke and van der laan, 2015 and 2016.

Usage

EYgstar(
  W,
  V,
  A,
  Y,
  g.SL.library,
  QAW.SL.library,
  blip.SL.library,
  metalearner,
  risk.type,
  grid.size = 100,
  VFolds = 10,
  QAW.fun = NULL,
  family = NULL,
  contrast = NULL,
  cs_to_try = NULL,
  alphas_to_try = NULL
)

Arguments

W

Data frame of observed baseline covariates

V

Data frame of observed baseline covariates (subset of W) used to design the ODTR

A

Vector of treatment

Y

Vector of outcome (continuous or binary)

g.SL.library

SuperLearner library for estimating txt mechanism

QAW.SL.library

SuperLearner library for estimating outcome regression

blip.SL.library

SuperLearner library for estimating the blip

metalearner

Discrete ("discrete"), blip-based ("blip").

risk.type

Risk type in order to pick optimal combination of coefficients to combine the candidate algorithms. For (1) MSE risk use "CV MSE"; for (2) -E[Ygstar] risk use "CV IPCWDR" (for -E[Ygstar] estimated using double-robust IPTW) or "CV TMLE" (for -E[Ygstar] estimates using TMLE); (3) For the upper bound of the CI of -E[Ygstar] use "CV TMLE CI"

grid.size

Grid size for simplex.sample() function to create possible combinations of coefficients

VFolds

Number of folds to use in cross-validation. Default is 10.

QAW.fun

True outcome regression E[Y|A,W]. Useful for simulations. Default is NULL.

family

either "gaussian" or "binomial". Default is null, if outcome is between 0 and 1 it will change to binomial, otherwise gaussian

contrast

An integer to contrast Psi = E[Ygstar]-E[Ycontrast] for CV-TMLE. For example, 0 will contrast Psi = E[Ygstar]-E[Y0]. Default is NULL.

cs_to_try

Constants for SL.blip.c

alphas_to_try

Convex combination alphas for SL.blip.alpha

odtr.obj

An object from the odtr function that estimates the odtr.

Value

If the true Qbar function is specified, the output will be a vector of point estimates of E[Ygstar] and their respective confidence intervals. This will be for both the estimated optimal rule and the true optimal rule. Performance results on the optimal rule will also be output: proportion of people treated under ODTR, proportion of times the estimated rule matches the optimal rule, the mean outcome under the estimated optimal rule under the true mean outcome function, and the mean outcome under the estimated optimal rule under the sample-specific true mean outcome.

If the true Qbar is not specified, return:

EYgstar_estimates

Point estimates and confidence intervals for E[Ygstar], using the unadjusted mean outcome for the people who received the optimal rule, g-computation, IPTW, IPTW-DR, TMLE

SL.odtr

SuperLearner list. See SL.blip or SL.vote documentation.


lmmontoya/SL.ODTR documentation built on Feb. 24, 2024, 10:46 a.m.