Skip to contents

Symmetric percentile trimming (Crump et al. 2009 spirit): weights above the (1-q) quantile are capped there.

Usage

morie_weight_trimming(w, q = 0.99)

Arguments

w

A morie_weight object.

q

Upper-quantile cap. Default 0.99.

Value

The trimmed morie_weight object.

Examples

d <- data.frame(t = rbinom(100, 1, 0.4), x = rnorm(100))
morie_weight_trimming(morie_weight_ps(d, "t", "x"))
#> morie_weight: logistic propensity + trim(q=0.99) (estimand ATE)
#>   n = 100  ESS = 85.4  weight range [1.356, 3.603]