This function computes the conditional probability of having
trt for each specified level either using glm
or SuperLearner. Currently, only two unique
values of treatment are acceptable. By default the function will compute
estimates of the conditional probability of trt == max(trt) and
compute the probability of trt == min(trt) as one minus this
probability.
estimateTreatment( dat, adjustVars, glm.trt = NULL, SL.trt = NULL, cvControl, returnModels = FALSE, verbose = FALSE, gtol = 0.001, ... )
| dat | An object of class |
|---|---|
| adjustVars | An object of class |
| glm.trt | A character formula for the right-hand side of the
|
| SL.trt | A specification of the |
| cvControl | A |
| returnModels | A |
| verbose | A |
| gtol | The truncation level of predicted trt probabilities to handle positivity violations. |
| ... | Other arguments. Not currently used |
dat The input data.frame object with two added columns
corresponding with the conditional probability (given adjustVars) of
trt==max(trt) and trt==min(trt).
trtMod If returnModels = TRUE, the fitted glm or
SuperLearner object. Otherwise, NULL