prop_strat {optrefine}R Documentation

Form propensity score strata

Description

Form initial propensity score strata to be improved upon by refine().

Usage

prop_strat(z, X, nstrata = 5)

Arguments

z

Vector of treatment assignment

X

Covariate matrix or data.frame

nstrata

The number of strata to form

Value

Object of class "strat", which is a list containing z, X with the propensity score as an additional column, base_strata (a factor of the resulting propensity score strata), and details, (a list containing X_std, which is the standardized version of the new X)

Examples

 ps <- prop_strat(z = rhc_X[, "z"],
                  X = rhc_X[,  !(colnames(rhc_X) %in% c("pr", "z"))])
table(rhc_X[, "z"], ps$base_strata)

[Package optrefine version 1.1.0 Index]