Description Usage Arguments Value
View source: R/treatment_estimate.R
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.
1 2 |
dat |
An object of class |
adjustVars |
An object of class |
glm.trt |
A character formula for the right-hand side of |
SL.trt |
A valid specification of the |
returnModels |
A boolean indicating whether fitted model objects should be returned. |
verbose |
A boolean passed to the |
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.