Run a complete pipeline required to estimate average treatment effects (ATEs) with survival data using propensity score methods. The pipeline (1) fits the propensity score model with fit_ps() or fit_ps_mi(), (2) predict the propensity score with predict_ps(), (3) weights patients using the propensity scores with psweight(), and estimates ATEs with surv_ate(). ps_surv() implements the pipeline for a single group while map_ps_surv() iterates over multiple groups.

ps_surv(xdata, formula = NULL, ydata, response, id = "patient_id", ...)

map_ps_surv(
  xdata_list,
  formula = NULL,
  ydata_list,
  response,
  id = "patient_id",
  grp_id,
  integer_grp_id = FALSE,
  ...
)

Arguments

xdata, xdata_list

A dataset containing the variables for propensity score modeling. This can either be an object produced by make_xdata() or a standard data frame. If a standard data frame, then formuls cannot be NULL and make_xdata() is run using formula.

formula

The propensity score formula as described in fit_ps(). Only required if data was not produced by make_xdata().

ydata, ydata_list

A data frame or list of data frames containing the response variables as described in surv_ate().

id

The name of the column in xdata and ydata identifying each patient.

...

Additional arguments to pass to make_xdata().

A

string containing the response for a survival model as described in surv_ate().

Value

ps_surv() returns an object of class ps_surv and map_ps_surv() returnes an object of class grouped_ps_surv. Both are lists containing the elements:

psfit

The propensity score model fit using fit_ps() or fit_ps_mi().

psweight

The propensity score weights returned by psweight().

ate

The average treatment effects returned by surv_ate().

call

The function call returned by match.call().