Predict propensity scores from a fitted statistical model. Fitted value from the model fit are used.

predict_ps(object, ...)

# S3 method for fit_ps
predict_ps(object, id = "patient_id", ...)

# S3 method for fit_ps_mi
predict_ps(object, id = "patient_id", ...)

Arguments

object

A fitted propensity score model of the appropriate class.

...

Currently unused.

id

Name of the variable from the data frame used to fit object that uniquely identifies each row. This is added as a column to the output.

Value

An object of class ps or ps_mi. A ps_mi object is a list of ps objects (one for each imputation) and a ps object is a list with elements:

ps

The propensity score.

lp

The linear predictor (i.e., the logit of the propensity score).

data

The data used to fit the propensity score model.

formula

The model formula used to fit the propensity score model.

treat

The name of the treatment variable.

x_vars

The names of all covariates (prior to any transformations or dummy variable coding) used in the propensity score model.

id

The