An internal function called by the tmle
function to obtain an estimate of conditional treatment assignment probabiliites \(P(A=1|W)\), and conditional probabilites for missingness, \(P(Delta=1|A,W)\). The estimate can be based on user-supplied values, a user-supplied regression formula, or a data-adaptive super learner fit. If the SuperLearner
package is not available, and there are no user-specifications, estimation is carried out using main terms regression with glm
. These main terms-based estimates may yield poor results.
estimateG(d, g1W, gform, SL.library, id, V, verbose, message,
outcome="A", newdata=d, discreteSL, obsWeights)
a vector containing values for \(P(A=1|W)\), matrix for \(P(Z=1|A,W)\), evaluated at A=0, A=1, or matrix \(P(Delta=1|Z,A,W))\) evaluated at (0,0), (0,1), (1,0), (1,1)
coefficients for each term in the working model used for estimation if glm
was used
estimation procedure
dataframe with binary dependent variable in the first column, predictors in remaining columns
vector of values for \(P(A=1|W)\), \(P(Z=1|A,W)\), or \(P(Delta=1|Z,A,W)\)
regression formula of the form A~W1
, (dependent variable is one of \(A,Z,D\)) if specified this overrides the call to SuperLearner
vector of prediction algorithms used by SuperLearner
, default value is (‘SL.glm’, ‘tmle.SL.dbarts.k.5’, ‘SL.gam’)
subject identifier
Number of cross validation folds for Super Learning
status messages printed if set to TRUE
text specifies whether treatment or missingness mechanism is being estimated
A, D, Z
to indicate which quantity is being estimated.
optional dataset to be used for prediction after fitting on d
.
If true, returns discrete SL estimates, otherwise ensemble estimates. Ignored when SL is not used.
sampling weights
Susan Gruber
tmle
,
estimateQ
,
calcParameters
,
tmleMSM
,
calcSigma