estimateQ_loop {drtmle}R Documentation

estimateQ_loop

Description

A helper loop function to clean up the internals of drtmle function.

Usage

estimateQ_loop(validRows, Y, A, W, DeltaA, DeltaY, verbose, returnModels, SL_Q,
  a_0, stratify, glm_Q, family, use_future, se_cv, se_cvFolds)

Arguments

validRows

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

Y

A vector of continuous or binary outcomes.

A

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

W

A data.frame of named covariates

DeltaA

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

DeltaY

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

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.

SL_Q

A vector of characters or a list describing the Super Learner library to be used for the outcome regression. See SuperLearner for details.

a_0

A list of fixed treatment values.

stratify

A boolean indicating whether to estimate the outcome regression separately for different values of A (if TRUE) or to pool across A (if FALSE).

glm_Q

A character describing a formula to be used in the call to glm for the outcome regression. Ignored if SL_Q!=NULL.

family

Should be gaussian() unless called from adaptive_iptw with binary Y.

use_future

Boolean indicating whether to use future_lapply or instead to just use lapply. The latter can be easier to run down errors.

se_cv

Should cross-validated nuisance parameter estimates be used for computing standard errors? Options are "none" = no cross-validation is performed; "partial" = only applicable if Super Learner is used for nuisance parameter estimates; "full" = full cross-validation is performed. See vignette for further details. Ignored if cvFolds > 1, since then cross-validated nuisance parameter estimates are used by default and it is assumed that you want full cross-validated standard errors.

se_cvFolds

If cross-validated nuisance parameter estimates are used to compute standard errors, how many folds should be used in this computation. If se_cv = "partial", then this option sets the number of folds used by the SuperLearner fitting procedure.


[Package drtmle version 1.1.2 Index]