Estimate average treatment effects (ATE) from survival data. A Cox proportional
hazards model (survival::coxph()
) is used to estimate hazard ratios and
Kaplan-Meier estimators (survival::survfit.formula()
) are used to estimate
survivor functions. surv_ate()
estimates ATEs for a single group
and map_surv_ate
iterates over groups and estimates ATEs for each group.
Confidence intervals for hazard ratios are estimated by clustering on id
using
the cluster
option in coxph()
. Estimates and confidences intervals are pooled
using Rubin's rule when object
contains weights from multiply imputed datasets.
surv_ate( object, ydata, response, id, double_adjustment = FALSE, ps_stratification = FALSE, n_strata = 10 ) map_surv_ate( object_list, ydata_list, response, id, double_adjustment = FALSE, grp_id, integer_grp_id = FALSE )
object, object_list | Either an object of class |
---|---|
ydata, ydata_list | Either a data frame containing the response variables
for survival modeling or a list of such objects. Both |
response | A string containing the response for a survival model.
This is the let hand side of a |
id | The name of the column in |
double_adjustment | If |
ps_stratification | If |
n_strata | Number of strata to divide subjects into based on values of the propensity score. |
A dplyr::tibble
with one row for each method
in object
.
Each row contains the columns: method
(the propensity score method),
fit
(tibble
containing the fitted Cox model),
loghr
(tibble
containing estimates of the log hazard ratio), and surv
(A
tibble
containing estimated survival probabilities for both treatment
and control).