estimateQr: estimateQr

Description Usage Arguments Value

Description

A function used to estimate the reduced dimension regressions for Q. The regression can be computed using a user specified function, passed through SL.Qr or using SuperLearner when length(SL.Qr) == 1 or is.list(SL.Qr). There is an error proofing of the SuperLearner implementation that deals with situations where the NNLS procedure in the Super Learner ensemble fails and so the function returns zero weights for every coefficient. In this case, the code will default to using the discrete Super Learner; that is, the learner with lowest CV-risk.

Usage

1
2
estimateQr(rQ1_1, rQ1_2, rQ2, g0n, g1n, A0, A1, SL.Qr, folds, validFold, abar,
  return.models, verbose, ...)

Arguments

rQ1_1

The "residual" for the first of two reduced-dimension regressions (on g0n).

rQ1_2

The "residual" for the second of two reduced-dimension regressions (on g0n).

rQ2

The "residual" for the second reduced dimension regression (on g1n), equal to the EIF at time 2.

g0n

A vector of estimates of g_0,0.

g1n

A vector of estimates of g_1,0.

A0

A vector treatment delivered at baseline.

A1

A vector treatment deliver after L1 is measured.

SL.Qr

A vector or list specifying the SuperLearner library to be used to estimate the reduced-dimension regression to protect against misspecification of the outcome regressions. See SuperLearner package for details.

folds

Vector of cross-validation folds

validFold

Which fold is the validation fold

abar

A vector of length 2 indicating the treatment assignment that is of interest.

return.models

A boolean indicating whether the models for Qr0 should be returned with the output.

verbose

A boolean indicating whether messages should be printed to indicate progress.

Value

A list with elements Q2nr.obsa, Q2rn.seta, Q1nr, Q2mod, and Q1mod. Q2nr.obsa corresponds to the predicted value of the reduced dimension regression where A0 is its observed value, while Q2nr.seta is the reduced dimension regression where A0 is set to abar[1].


benkeser/drinf documentation built on May 12, 2019, 11:59 a.m.