Doubly robust estimators of treatment effects for ordinal outcomes
Author: David Benkeser
drord
is an R package that computes estimates of effect parameters that are useful for evaluating efficacy of treatments on ordinal outcomes. The effect estimates are covariate-adjusted, which means they can be used in observational settings or to gain efficiency in randomized trials.
The estimators implemented in the package are doubly robust, in that they are based on working models for the probability of treatment as a function of covariates (i.e., the propensity score) and for the CDF of the outcome as a function of covariates in each treatment arm. The latter working model is implemented via proportional odds models that are fit in each treatment arm separately. Estimates based on these two working models are combined to quantify the effects of the treatment on the ordinal outcome in three different ways:
A developmental release may be installed from GitHub via devtools
with:
devtools::install_github("benkeser/drord")
Here we demonstrate calls to drord
to compute treatment effects using a simulated data set of COVID-19 outcomes in hospitalized patients.
library(drord)
#> drord: Doubly robust estimators for ordinal outcomes
#> Version: 1.0.0
# load data
data(covid19)
# estimate treatment effects
fit <- drord(out = covid19$out,
covar = covid19[ , "age_grp", drop = FALSE],
treat = covid19$treat)
#> Warning in eval(family$initialize): non-integer #successes in a binomial glm!
#> Warning in eval(family$initialize): non-integer #successes in a binomial glm!
# look at estimates
fit
#> $mann_whitney
#> est wald_cil wald_ciu
#> 0.5800689 0.5337929 0.6263449
#>
#> $log_odds
#> est wald_cil wald_ciu
#> treat1 -1.2922742 -1.5719616 -1.01258678
#> treat0 -0.9163279 -1.1533670 -0.67928881
#> diff -0.3759463 -0.7254384 -0.02645421
#>
#> $weighted_mean
#> est wald_cil wald_ciu
#> treat1 2.5554260 2.46316500 2.6476871
#> treat0 2.3721986 2.28768451 2.4567127
#> diff 0.1832275 0.06389974 0.3025552
There is a plot
method included to visualize either the cumulative distribution or probability mass function of outcomes.
# plot of CDF
cdf_plot <- plot(fit, dist = "cdf",
treat_labels = c("Treatment", "Control"),
out_labels = c("Death", "Death or intubation"))
cdf_plot$plot + ggsci::scale_fill_nejm()
The black bars are pointwise 95% confidence intervals; the gray bars are simultaneous 95% confidence intervals.
A similar plot can be made for the PMF.
# plot of PMF
pmf_plot <- plot(fit, dist = "pmf",
treat_labels = c("Treatment", "Control"),
out_labels = c("Death", "Intubation", "None"))
pmf_plot$plot + ggsci::scale_fill_nejm()
After using the drord
R package, please cite both of the following:
@Manual{drordpackage,
= {drord: Doubly-Robust Estimators for Ordinal Outcomes},
title = {David Benkeser},
author = {R package version 1.0.1}
note
}
@article{benkeserdiazluedtke2020,
= {Improving Precision and Power in Randomized Trials for COVID-19 Treatments Using Covariate Adjustment, for Ordinal or Time to Event Outcomes},
title = {Biometrics},
journal = {https://doi.org/10.1111/biom.13377}
doi }
© 2020- David Benkeser
The contents of this repository are distributed under the MIT license. See below for details:
License (MIT)
The MIT
Copyright (c) 2020- David Benkeser
Permission is hereby granted, free of charge, to any person obtaining a copyfiles (the "Software"), to deal
of this software and associated documentation in the Software without restriction, including without limitation the rights
/or sell
to use, copy, modify, merge, publish, distribute, sublicense, and
copies of the Software, and to permit persons to whom the Software is:
furnished to do so, subject to the following conditions
in all
The above copyright notice and this permission notice shall be included
copies or substantial portions of the Software.
"AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
THE SOFTWARE IS PROVIDED
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.