Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

get.weights

Extract propensity score weights.


Description

Extracts propensity score weights from a ps or mnps object.

Usage

get.weights(ps1, stop.method = NULL, estimand = NULL, withSampW = TRUE)

Arguments

ps1

A ps or mnps object.

stop.method

Indicates which set of weights to retrieve from the ps object.

estimand

Indicates whether the weights are for the average treatment effect on the treated (ATT) or the average treatment effect on the population (ATE). By default, get.weights will use the estimand used to fit the ps object.

withSampW

Whether to return weights with sample weights multiplied in, if they were provided in the original ps or mnps call. Default: TRUE.

Details

Weights for ATT are 1 for the treatment cases and p/(1-p) for the control cases. Weights for ATE are 1/p for the treatment cases and 1/(1-p) for the control cases.

Value

Returns a vector of weights.

See Also


twang

Toolkit for Weighting and Analysis of Nonequivalent Groups

v2.0
GPL-3 | file LICENSE
Authors
Matthew Cefalu <Matthew_Cefalu@rand.org>, Greg Ridgeway, Dan McCaffrey, Andrew Morral, Beth Ann Griffin, and Lane Burgette
Initial release
2021-03-22

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.