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)
x | A variable containing the propensity methods. |
---|
A factor
variable.
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