
propensity: A Toolkit for Calculating and Working with Propensity Scores
Source:R/propensity-package.R
propensity-package.Rdpropensity provides tools for propensity score analysis in causal inference. Calculate propensity score weights for a variety of causal estimands, handle extreme propensity scores through trimming, truncation, and calibration, and estimate causal effects with inverse probability weighting. The package supports binary, categorical, and continuous exposures.
Weight functions
Calculate propensity score weights for different causal estimands:
wt_ate(): Average treatment effect (ATE) weightswt_att(): Average treatment effect on the treated (ATT) weightswt_atu(): Average treatment effect on the untreated (ATU) weights (wt_atc()is an alias)wt_atm(): Average treatment effect for the evenly matchable (ATM) weightswt_ato(): Average treatment effect for the overlap population (ATO) weightswt_entropy(): Entropy balancing weightswt_cens(): Censoring weights
Propensity score modifications
Handle extreme propensity scores before calculating weights:
ps_trim(): Trim observations with extreme propensity scoresps_trunc(): Truncate (winsorize) extreme propensity scoresps_calibrate(): Calibrate propensity scores to improve balanceps_refit(): Re-estimate the propensity score model after trimming
Estimation
ipw(): Inverse probability weighted estimator with variance estimation that accounts for propensity score estimation uncertainty
PSW class
The psw() class represents propensity score weights with metadata about
the estimand and modifications applied:
psw(),as_psw(),is_psw(): Create and test propensity score weightsestimand(): Query the causal estimandis_stabilized(): Check if weights are stabilized
See also
vignette("propensity")for a getting started guideThe package website for full documentation
Author
Maintainer: Malcolm Barrett malcolmbarrett@gmail.com (ORCID) [copyright holder]