Logistic propensity estimation via the native fitter with the standard estimand-specific weight transforms; optional stabilization (Austin 2009) and symmetric trimming.
Usage
morie_weight_ps(
data,
treatment,
covariates,
estimand = "ATE",
stabilize = FALSE,
trim = NULL
)Arguments
- data
Data frame.
- treatment
Binary treatment column (0/1).
- covariates
Covariate column names.
- estimand
"ATE" (default), "ATT", or "ATC".
- stabilize
Multiply by the marginal treatment probability (stabilized IPW). Default FALSE.
- trim
Optional symmetric propensity trim, e.g. 0.01 clips scores to the interval 0.01 to 0.99.
Examples
d <- data.frame(t = rbinom(100, 1, 0.4), x = rnorm(100))
morie_weight_ps(d, "t", "x")
#> morie_weight: logistic propensity (estimand ATE)
#> n = 100 ESS = 95.9 weight range [1.586, 2.688]
