get_prop_scores: Parse 'propensity' input to obtain propensity scores

View source: R/S3_methods.R

get_prop_scoresR Documentation

Parse propensity input to obtain propensity scores

Description

the propensity input to plot.auto_strata or plot.manual_strata can be propensity scores, a propensity model, or a formula for propensity score. This function figures out which type propensity is and returns the propensity scores. Returns the propensity score on the response scale (rather than the linear predictor), so the scores are the predited probabilities of treatment.

Usage

get_prop_scores(propensity, data, treat)

Arguments

propensity

either a vector of propensity scores, a model for propensity, or a formula for propensity scores

data,

the analysis set data within a stratum

treat,

the name of the treatment assignment column

Value

vector of propensity scores


stratamatch documentation built on March 31, 2022, 9:07 a.m.