Convert a variable containing propensity score methods (as in the argument methods from psweight()) to a factor variable with pretty labels for the propensity score methods.

label_ps_method(x)

Arguments

x

A variable containing the propensity methods.

Value

A factor variable.

Examples

label_ps_method(c("iptw_att", "iptw_att_trim", "match_nearest", "match_nearest_caliper", "match_genetic", "match_genetic_caliper", "ps_stratification", "unadjusted"))
#> [1] IPTW-ATT IPTW-ATT (trim) #> [3] Nearest neighbor matching Nearest neighbor matching (caliper) #> [5] Genetic matching Genetic matching (caliper) #> [7] PS stratification Unadjusted #> 8 Levels: IPTW-ATT IPTW-ATT (trim) ... Unadjusted