Skip to content

Spline showcase in Covid-19 ITS example - #1180

Draft
milesalanmoore wants to merge 3 commits into
pymc-labs:mainfrom
milesalanmoore:docs-splines
Draft

Spline showcase in Covid-19 ITS example#1180
milesalanmoore wants to merge 3 commits into
pymc-labs:mainfrom
milesalanmoore:docs-splines

Conversation

@milesalanmoore

@milesalanmoore milesalanmoore commented Aug 30, 2026

Copy link
Copy Markdown

This PR updates the COVID interrupted time-series notebook to show a spline-based alternative to a simple linear baseline. It adds a more flexible specification, demonstrates the diagnostics needed to assess model fit and convergence, also demonstrates a custom RW2 prior and Bayesian P-spline approach that leverages pymc-extra's VariableFactory protocol and walks through the resulting counterfactual trend and estimated intervention effect. This addresses #475.

This is just a proof of concept / rough draft! I recognize the narrative still needs revision. For now: I wonder if something like this is what you had in mind for #475 @drbenvincent ?

Thank you for thoughtfully maintaining a great library!

@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@github-actions

Copy link
Copy Markdown
Contributor

👋 Welcome to CausalPy, @milesalanmoore!

Thank you for opening your first pull request! We're excited to have you contribute to the project. 🎉

Here are a few tips to help your PR get merged smoothly:

  • ✅ Make sure all CI checks pass (tests, linting, type checking)
  • 📝 Run prek run --all-files locally before pushing
  • 📖 Check our Contributing Guide for more details

A maintainer will review your changes soon. Thanks for helping make CausalPy better! 🚀


💼 LinkedIn Shoutout: Once your PR is merged, we'd love to give you a shoutout on LinkedIn to thank you for your contribution! If you're interested, just drop your LinkedIn profile URL in a comment below.

@read-the-docs-community

read-the-docs-community Bot commented Aug 30, 2026

Copy link
Copy Markdown

Documentation build overview

📚 causalpy | 🛠️ Build #34303465 | 📁 Comparing 98a98d0 against latest (994f665)

  🔍 Preview build  

2 files changed
± 404.html
± notebooks/interrupted-time-series-covid.html

@codecov

codecov Bot commented Aug 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.03%. Comparing base (994f665) to head (517e574).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1180   +/-   ##
=======================================
  Coverage   96.03%   96.03%           
=======================================
  Files         105      105           
  Lines       16363    16370    +7     
  Branches      916      916           
=======================================
+ Hits        15714    15721    +7     
  Misses        485      485           
  Partials      164      164           

☔ View full report in Codecov by Harness.
📢 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.

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