Estimate Treatment or Missingness Mechanism
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, newdata=d, discreteSL)
d |
dataframe with binary dependent variable in the first column, predictors in remaining columns |
g1W |
vector of values for P(A=1|W), P(Z=1|A,W), or P(Delta=1|Z,A,W) |
gform |
regression formula of the form |
SL.library |
vector of prediction algorithms used by |
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 |
|
newdata |
optional dataset to be used for prediction after fitting on |
discreteSL |
If true, returns discrete SL estimates, otherwise ensemble estimates. Ignored when SL is not used. |
g1W |
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) |
coef |
coefficients for each term in the working model used for estimation if |
type |
estimation procedure |
Susan Gruber
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.