sensitize.data.frame: Compute the sensitivity-adjusted estimates of predicted outcome given
treatment/control
Description
Compute the sensitivity-adjusted estimates of predicted outcome given
treatment/control
Usage
# S3 method for data.frame
sensitize(obj, q, dp, d0, d1, debug = FALSE, ...)
Arguments
obj
data frame to analyze; must include columns $treat: Observed
(binary) treatment, e.g., bail_set $resp_ctl: Predicted probability of
positive resp given control, $resp_trt: Predicted probability of positive
resp given treatment, $p_trt: predicted probability of treatment
q
p(u = 1 | x)
dp
change in log-odds of treat = 1 if u = 1
d0
change in log-odds of response = 1 if treat = 0 and u = 1
d1
change in log-odds of response = 1 if treat = 1 and u = 1
debug
logical, whether or not to return columns of intermediate
variables for debugging purposes
...
additional arguments are ignored
Value
A data frame with the columns resp_ctl and resp_trt updated according
to the sensitivity parameters. If debug = TRUE, returned data frame will
also contain columns of intermediate variables computed for sensitivity,
appended with "__" (e.g., gamma__), with the original response estimates
renamed as resp_trt_trt__ = resp_trt resp_ctl_ctl__ = resp_ctl