drord {drord}R Documentation

Doubly robust estimates of for evaluating effects of treatments on ordinal outcomes.

Description

The available parameters for evaluating treatment efficacy are:

Usage

drord(
  out,
  treat,
  covar,
  out_levels = sort(unique(out)),
  out_form = paste0(colnames(covar), collapse = "+"),
  out_weights = rep(1, length(out_levels)),
  out_model = "pooled-logistic",
  treat_form = "1",
  param = c("weighted_mean", "log_odds", "mann_whitney"),
  ci = "wald",
  alpha = 0.05,
  nboot = 1000,
  return_models = TRUE,
  est_dist = TRUE,
  stratify = FALSE,
  ...
)

Arguments

out

A numeric vector containing the outcomes. Missing outcomes are allowed.

treat

A numeric vector containing treatment status. Missing values are not allowed unless the corresponding entry in out is also missing. Only values of 0 or 1 are treated as actual treatment levels. Any other value is assumed to encode a value for which the outcome is missing and the corresponding outcome value is ignored.

covar

A data.frame containing the covariates to include in the working proportional odds model.

out_levels

A numeric vector containing all ordered levels of the outcome.

out_form

The right-hand side of a regression formula for the working proportional odds model. NOTE: THIS FORMULA MUST NOT SUPPRESS THE INTERCEPT.

out_weights

A vector of numeric weights with length equal to the length of out_levels.

out_model

Which R function should be used to fit the proportional odds model. The recommended option is "pooled-logistic". Other options available include "polr" (from the MASS package), "vglm" (from the VGAM package), or "clm" (from the ordinal package).

treat_form

The right-hand side of a regression formula for the working model of treatment probability as a function of covariates

param

A vector of characters indicating which of the three treatment effect parameters should be estimated ("weighted_mean", "log_odds", and/or "mann_whitney").

ci

A vector of characters indicating which confidence intervals should be computed ("bca" and/or "wald")

alpha

Confidence intervals have nominal level 1-alpha.

nboot

Number of bootstrap replicates used to compute bootstrap confidence intervals.

return_models

If TRUE the fitted working proportional odds models and treatment probability models are returned.

est_dist

A boolean indicating whether estimates of the CDF and PMF should be computed and returned. For real data analysis, we generally recommend leaving as TRUE; however, when studying performance in simulations, it can save time to set to FALSE.

stratify

If TRUE, then a fully stratified estimator is computed, i.e., the empirical CDF of each treatment arm is estimated stratifying by levels of covar. For now, this option is limited to univariate covariates.

...

Other options (not currently used).

Details

In each case, estimates are constructed by obtaining a doubly robust estimate of the cumulative distribution function (CDF) for each treatment group. This is achieved by fitting a (working) proportional odds model that includes inverse probability of treatment weights. The inclusion of these weights ensures that, so long as the working model includes intercept terms, the resultant estimate of the CDF is an augmented inverse probability of treatment weighted estimate. This implies that the estimate is nonparametric efficient if the working model contains the truth; however, even if the working model does not contain the truth, the CDF estimates are consistent and asymptotically normal with variance expected to dominate that of an unadjusted estimate of the same treatment effect.

The CDF estimates are subsequently mapped into estimates of each requested parameter for evaluating treatment effects. The double robustness and efficiency properties of the CDF estimates extend to these quantities as well. Confidence intervals and hypothesis tests can be carried out in closed form using Wald-style intervals and tests or using a nonparametric corrected and accelerated bootstrap (BCa). Inference for the CDF and probability mass function is also returned and can be used for subsequent visualizations (see plot.drord).

Value

An object of class drord. In addition to information related to how drord was called, the output contains the following:

log_odds

inference pertaining to the log-odds parameter. NULL if this parameter not requested in call to drord.

mann_whitney

inference pertaining to the Mann-Whitney parameter. NULL if this parameter not requested in call to drord.

weighted_mean

inference pertaining to weighted mean parameter. NULL if this parameter not requested in call to drord.

cdf

inference pertaining to the treatment-specific CDFs. See the plot method for a convenient way of visualizing this information. NULL if est_dist = FALSE in call to drord.

pmf

inference pertaining to the treatment-specific PMFs. See the plot method for a convenient way of visualizing this information. NULL if est_dist = FALSE in call to drord.

treat_mod

the fitted model for the probability of treatment as a function of covariates. NULL if return_models = FALSE

out_mod

the proportional odds model fit in each treatment arm. named entries in list indicate the corresponding treatment arm. NULL if return_models = FALSE or stratify = TRUE.

Examples

data(covid19)

# get estimates of all parameters based on main-effects 
# proportional odds model and intercept-only propensity model
fit <- drord(out = covid19$out, treat = covid19$treat, 
             covar = covid19[, "age_grp", drop = FALSE])

# get estimates of all parameters based on proportional odds and
# propensity model that treats age_grp as categorical
fit2 <- drord(out = covid19$out, treat = covid19$treat, 
              covar = covid19[, "age_grp", drop = FALSE],
				 out_form = "factor(age_grp)",
				 treat_form = "factor(age_grp)")

# obtain estimator stratified by age group 
fit3 <- drord(out = covid19$out, treat = covid19$treat, 
              covar = covid19[, "age_grp", drop = FALSE],
				 stratify = TRUE)

# demonstration with missing outcome data
covid19$out[1:5] <- NA

# propensity model should now adjust for covariates to address
# the potential for informative missingness
fit4 <- drord(out = covid19$out, treat = covid19$treat, 
              covar = covid19[, "age_grp", drop = FALSE],
				 treat_form = "age_grp")

[Package drord version 1.0.1 Index]