Package: propensity 0.1.0.9000

Malcolm Barrett

propensity: A Toolkit for Calculating and Working with Propensity Scores

Calculates propensity score weights for multiple causal 'estimands' across binary, continuous, and categorical exposures. Provides methods for handling extreme propensity scores through trimming, truncation, and calibration. Includes inverse probability weighted estimators that correctly account for propensity score estimation uncertainty.

Authors:Malcolm Barrett [aut, cre, cph]

propensity_0.1.0.9000.tar.gz
propensity_0.1.0.9000.zip(r-4.7-any)propensity_0.1.0.9000.zip(r-4.6-any)propensity_0.1.0.9000.zip(r-4.5-any)
propensity_0.1.0.9000.tgz(r-4.6-any)propensity_0.1.0.9000.tgz(r-4.5-any)
propensity_0.1.0.9000.tar.gz(r-4.7-any)propensity_0.1.0.9000.tar.gz(r-4.6-any)
propensity_0.1.0.9000.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
propensity/json (API)

# Install 'propensity' in R:
install.packages('propensity', repos = c('https://r-causal.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/r-causal/propensity/issues

Pkgdown/docs site:https://r-causal.github.io

On CRAN:

Conda:

8.33 score 26 stars 2 packages 126 scripts 355 downloads 54 exports 17 dependencies

Last updated from:e9d163a2ac. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK747
source / vignettesOK251
linux-releaseOK1005
macos-releaseOK500
macos-oldrelOK385
windows-develOK917
windows-releaseOK836
windows-oldrelOK781
wasm-releaseOK136

Exports:as_conditionalas_marginalas_pswaugmentdens_fndens_kerneldens_laplacedens_normaldens_tdensity_metaestimandestimand<-exposure_typeglanceipwis_causal_wtis_joint_wtis_joint_wt_modelsis_ps_calibratedis_ps_trimmedis_ps_truncatedis_pswis_refitis_stabilizedis_unit_trimmedis_unit_truncatedis_unit_wt_truncatedis_wt_truncatedjoint_wt_metajoint_wt_modelsnew_pswnumerator_modelpool_ipwps_calibrateps_refitps_tiltps_trimps_trim_metaps_truncps_trunc_metapswstabilization_scoretidywt_atcwt_atewt_atmwt_atowt_attwt_atuwt_censwt_entropywt_jointwt_truncwt_trunc_sensitivity

Dependencies:causalgenericsclideligenericsgluelifecyclemagrittrpillarpkgconfigrlangrootSolveS7tibbletidyselectutf8vctrswithr

Getting Started with propensity
Setup | Basic workflow | Step 1: Fit a propensity score model | Step 2: Calculate weights and fit a weighted outcome model | Step 3: Estimate causal effects | Choosing an estimand | Handling extreme weights | Overlap estimands | Trimming | Truncation | Which approach? | Interpreting results | Binary outcomes | Continuous outcomes | Next steps | Continuous exposures | Categorical exposures | Calibration | Censoring weights | Learning more

Last update: 2026-09-17
Started: 2026-02-23

Effect modification and interaction
Two different questions | A dataset where they diverge | Effect modification with .by | Interaction with a joint intervention | Why the two numbers differ | Interaction is symmetric | Odds ratios and effect modification | Guardrails on joint weights | Two notes on labels | Learning more

Last update: 2026-08-29
Started: 2026-08-10

Readme and manuals

Help Manual

Help pageTopics
propensity: A Toolkit for Calculating and Working with Propensity Scorespropensity-package propensity
Augment an inverse probability weighted result with per-observation columnsaugment.ipw
Density specifications for continuous exposuresdens_fn dens_kernel dens_laplace dens_normal dens_t
What a set of weights records about the exposuredensity_meta exposure_type format.propensity_density_meta print.propensity_density_meta
Glance at an inverse probability weighted resultglance.ipw
Glance at a pooled inverse probability weighted resultglance.ipw_pooled
Inverse Probability Weighted Estimationipw-methods ipw.glm ipw.joint_wt_models ipw.lm ipw.multinom
Check if propensity scores are calibratedis_ps_calibrated
Test whether propensity scores have been trimmedis_ps_trimmed
Test whether propensity scores have been truncatedis_ps_truncated
Check if propensity scores have been refitis_refit
Identify which units were trimmedis_unit_trimmed
Identify which units were truncatedis_unit_truncated
Test whether the weights themselves have been truncatedis_unit_wt_truncated is_wt_truncated
Record the two treatment models of a joint exposureis_joint_wt_models joint_wt_models
The model a set of weights was stabilized onnumerator_model
Print a result whose standard errors are a diagnosticas.data.frame.ipw_diagnostic_se print.ipw_diagnostic_se tidy.ipw_diagnostic_se
Calibrate propensity scoresps_calibrate
Refit a Propensity Score Model on Retained Observationsps_refit
Propensity score tilting functionsps_tilt
Trim Propensity Scoresps_trim
Extract trimming metadata from a 'ps_trim' objectps_trim_meta
Truncate (Winsorize) Propensity Scoresps_trunc
Extract truncation metadata from a 'ps_trunc' objectps_trunc_meta
Propensity Score Weight Vectorsas_psw is_psw is_stabilized new_psw psw stabilization_score
Tidy an inverse probability weighted resulttidy.ipw
Tidy a pooled inverse probability weighted resulttidy.ipw_pooled
Calculate propensity score weightswt_atc wt_ate wt_ate.data.frame wt_atm wt_atm.data.frame wt_ato wt_ato.data.frame wt_att wt_att.data.frame wt_atu wt_atu.data.frame wt_cens wt_cens.data.frame wt_entropy wt_entropy.data.frame
Product weights for a joint intervention on two treatmentsis_joint_wt joint_wt_meta wt_joint
Truncate (Winsorize) Propensity Score Weightswt_trunc
Tabulate Truncated Weights Over a Grid of Boundswt_trunc_sensitivity