estimateG function

Estimate Treatment or Missingness Mechanism

Estimate Treatment or Missingness Mechanism

An internal function called by the tmle function to obtain an estimate of conditional treatment assignment probabiliites P(A=1W)P(A=1|W), and conditional probabilites for missingness, P(Delta=1A,W)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)

Arguments

  • d: dataframe with binary dependent variable in the first column, predictors in remaining columns
  • g1W: vector of values for P(A=1W)P(A=1|W), P(Z=1A,W)P(Z=1|A,W), or P(Delta=1Z,A,W)P(Delta=1|Z,A,W)
  • gform: regression formula of the form A~W1, (dependent variable is one of A,Z,DA,Z,D) if specified this overrides the call to SuperLearner
  • SL.library: vector of prediction algorithms used by SuperLearner, default value is (SL.glm , tmle.SL.dbarts.k.5 , SL.gam )
  • id: subject identifier
  • V: Number of cross validation folds for Super Learning
  • verbose: status messages printed if set to TRUE
  • message: text specifies whether treatment or missingness mechanism is being estimated
  • outcome: A, D, Z to indicate which quantity is being estimated.
  • newdata: optional dataset to be used for prediction after fitting on d.
  • discreteSL: If true, returns discrete SL estimates, otherwise ensemble estimates. Ignored when SL is not used.
  • obsWeights: sampling weights

Returns

  • g1W: a vector containing values for P(A=1W)P(A=1|W), matrix for P(Z=1A,W)P(Z=1|A,W), evaluated at A=0, A=1, or matrix P(Delta=1Z,A,W))P(Delta=1|Z,A,W)) evaluated at (0,0), (0,1), (1,0), (1,1)

  • coef: coefficients for each term in the working model used for estimation if glm was used

  • type: estimation procedure

Author(s)

Susan Gruber

See Also

tmle, estimateQ, calcParameters, tmleMSM, calcSigma