Estimates the probability of treatment via logistic regression or gradient boosting on a set of covariates.
Usage
morie_matching_estimate_propensity(
data,
treatment,
covariates,
model = "logistic",
max_iter = 1000
)Value
A numeric vector of propensity scores aligned to the rows of
data (after dropping NAs in treatment or
covariates); the names of the vector are the row names
of the retained rows.
References
Rosenbaum, P. R., & Rubin, D. B. (1983). The central role of the propensity score in observational studies for causal effects. Biometrika, 70(1), 41–55.
Examples
if (FALSE) { # \dontrun{
df <- data.frame(d = rbinom(200, 1, 0.4),
x1 = rnorm(200), x2 = rnorm(200))
ps <- morie_matching_estimate_propensity(df, "d", c("x1", "x2"))
} # }