Skip to contents

fitted() is the canonical extractor for the model-averaged scores of a psave() fit; weights() extracts the inverse-probability weights implied by the averaged propensity score at the fitted estimand.

Usage

# S3 method for class 'psave'
fitted(object, type = c("ps", "prog"), ...)

# S3 method for class 'psave'
weights(object, ...)

Arguments

object

A psave object.

type

"ps" (default) for the model-averaged propensity score, or "prog" for the model-averaged prognostic score.

...

Ignored.

Value

For fitted(), a numeric vector named by the rownames of the analyzed data. For weights(), the numeric vector object$weights (weights at the fitted estimand only; for other estimands use WeightIt::get_w_from_ps(fitted(object), object$treat, estimand = ...)).