Skip to contents

Overview

A tour of the package, from weights to effect estimates.

propensity propensity-package
propensity: A Toolkit for Calculating and Working with Propensity Scores

Weights

Propensity score weights for each estimand, across binary, categorical, and continuous exposures.

Weight objects

Construct propensity score weights and read what they record.

new_psw() psw() is_psw() is_stabilized() stabilization_score() as_psw()
Propensity Score Weight Vectors
exposure_type() density_meta() format(<propensity_density_meta>) print(<propensity_density_meta>)
What a set of weights records about the exposure
numerator_model()
The model a set of weights was stabilized on

Joint treatments

Weights for a sequence of two treatments, from a factorized pair of treatment models.

joint_wt_models() is_joint_wt_models()
Record the two treatment models of a joint exposure
wt_joint() is_joint_wt() joint_wt_meta()
Product weights for a joint intervention on two treatments

Continuous exposure densities

The density families a continuous exposure’s weights are built from.

dens_normal() dens_laplace() dens_t() dens_kernel() dens_fn()
Density specifications for continuous exposures

Trimming

Restrict a set of propensity scores to a region of overlap, and refit the model on what remains.

ps_trim()
Trim Propensity Scores
ps_trim_meta()
Extract trimming metadata from a ps_trim object
is_ps_trimmed()
Test whether propensity scores have been trimmed
is_unit_trimmed()
Identify which units were trimmed
ps_refit()
Refit a Propensity Score Model on Retained Observations
is_refit()
Check if propensity scores have been refit

Truncation

Bound extreme propensity scores in place rather than dropping them.

ps_trunc()
Truncate (Winsorize) Propensity Scores
ps_trunc_meta()
Extract truncation metadata from a ps_trunc object
is_ps_truncated()
Test whether propensity scores have been truncated
is_unit_truncated()
Identify which units were truncated

Calibration and tilting

Recalibrate fitted propensity scores, and evaluate the tilting function an estimand implies.

ps_calibrate()
Calibrate propensity scores
is_ps_calibrated()
Check if propensity scores are calibrated
ps_tilt()
Propensity score tilting functions

Effect estimation

Inverse probability weighted estimation and the surfaces its results are read through.

ipw(<joint_wt_models>) ipw(<multinom>) ipw(<lm>) ipw(<glm>)
Inverse Probability Weighted Estimation
print(<ipw_diagnostic_se>) as.data.frame(<ipw_diagnostic_se>) tidy(<ipw_diagnostic_se>)
Print a result whose standard errors are a diagnostic
tidy(<ipw>)
Tidy an inverse probability weighted result
glance(<ipw>)
Glance at an inverse probability weighted result
augment(<ipw>)
Augment an inverse probability weighted result with per-observation columns
tidy(<ipw_pooled>)
Tidy a pooled inverse probability weighted result
glance(<ipw_pooled>)
Glance at a pooled inverse probability weighted result

Re-exports