adding hierarchical its#833
Conversation
Signed-off-by: Nathaniel <NathanielF@users.noreply.github.com>
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #833 +/- ##
==========================================
+ Coverage 94.20% 94.66% +0.45%
==========================================
Files 78 82 +4
Lines 11880 13515 +1635
Branches 695 850 +155
==========================================
+ Hits 11192 12794 +1602
- Misses 496 501 +5
- Partials 192 220 +28 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Signed-off-by: Nathaniel <NathanielF@users.noreply.github.com>
Signed-off-by: Nathaniel <NathanielF@users.noreply.github.com>
Signed-off-by: Nathaniel <NathanielF@users.noreply.github.com>
Signed-off-by: Nathaniel <NathanielF@users.noreply.github.com>
Signed-off-by: Nathaniel <NathanielF@users.noreply.github.com>
Signed-off-by: Nathaniel <NathanielF@users.noreply.github.com>
|
I think this is good for a review. |
|
Some things to consider when reviewing.
|
Code review (claude-opus-4-4-xhigh)Reviewing the code in this PR only — I have not reviewed A genuinely useful addition — staggered-launch panels with hierarchical pooling and event-study/placebo parameterizations are a real gap in CausalPy, and the PyMC model is well-structured (non-centered everywhere, sensible data-adaptive priors, optional Fourier/AR machinery). The 32 tests pass locally. Below is a critical-but-constructive pass focused on correctness, repo consistency, and test coverage. Critical issues (correctness)1. Silent data-corruption bug in AR(1)
|
Signed-off-by: Nathaniel <NathanielF@users.noreply.github.com>
Signed-off-by: Nathaniel <NathanielF@users.noreply.github.com>
drbenvincent
left a comment
There was a problem hiding this comment.
Thanks — this is a solid start on #830 and the hierarchical ITS / event-study direction looks right.
Before merge, two blockers on current main:
- Please rebase onto
main— the branch is well behind and merge status is blocked. - Add an explicit keyword-only
plot()that forwards to_render_plot(). Tests callresult.plot(), andgenerate_report()callsexperiment.plot(); currentmainno longer inheritsplot()fromBaseExperiment(#886), so this raisesAttributeErrorafter rebase.
Non-blocking for this round (follow-ups or a quick fix if easy):
- Document placebo-mode counterfactual semantics: when
effect_on=False, pre-launch bins stay active and only post-launch bins are zeroed, which affectsimpactandplot_unit(). Worth a short docstring/note so users interpret those plots correctly. - Consider follow-up issues for
get_plot_data_bayesian(), wiring covariate pooling priors (mu_beta/sigma_beta) through the priors API, and an optional flag to disable the hierarchical time trend.
I have not done a thorough manual pass on the new docs notebook yet — I will try to review the RTD page in the next few days, so there may be some presentational feedback to follow.
Working on this ticket: #830