Skip to contents

Convenience pass-through to WeightIt::weightit(): constructs balancing weights from the propensity score of an oal() fit, reusing the stored formula and data. Equivalent to the canonical explicit call

WeightIt::weightit(<formula>, data = <data>, ps = fit$ps, estimand = <estimand>, ...)

All ... arguments are forwarded verbatim; the return value is an ordinary weightit object.

Usage

oal_weight(object, estimand = object$estimand, ...)

Arguments

object

An oal object.

estimand

The estimand passed to WeightIt::weightit(); defaults to the estimand of the fit (note that the wAMD selection already used the fitted estimand's weights).

...

Arguments forwarded verbatim to WeightIt::weightit().

Value

A weightit object; see WeightIt::weightit().

Examples

data("lalonde", package = "MatchIt")
fit <- oal(treat ~ age + educ + married + re74, data = lalonde,
           outcome = ~ re78)
w <- oal_weight(fit)