Skip to content

Propensity score latent - DRAFT #500

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

NathanielF
Copy link
Contributor

@NathanielF NathanielF commented Jul 6, 2025

Working on a draft PR to improve or augment the existing propensity scoring weighting implementation. In particular to make it a bit faster and more "Bayesian". As it currently stands we are performing a two-step strategy where we fit a propensity score model and then push the values of the posterior estimate for the propensity score through a re-weighting routine to estimate the causal contrast.

But we could try and explore a more properly Bayesian model where we fit the propensity score outcome and the model outcome at once in the same model context. This more properly Bayesian and a good bit faster.

See for instance, work here: https://github.com/ajnafa/Latent-Bayesian-MSM by Jordan Nafa and Andrew Heiss

Adding a POC notebook to start


📚 Documentation preview 📚: https://causalpy--500.org.readthedocs.build/en/500/

Signed-off-by: Nathaniel <NathanielF@users.noreply.github.com>
Signed-off-by: Nathaniel <NathanielF@users.noreply.github.com>
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Copy link

codecov bot commented Jul 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.59%. Comparing base (fdce5b0) to head (96098cb).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #500   +/-   ##
=======================================
  Coverage   94.59%   94.59%           
=======================================
  Files          28       28           
  Lines        2053     2053           
=======================================
  Hits         1942     1942           
  Misses        111      111           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Nathaniel <NathanielF@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant