-
Notifications
You must be signed in to change notification settings - Fork 71
Add docs on justifying instruments in the IV approach #345
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
Conversation
Signed-off-by: Nathaniel <[email protected]>
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
For discussion @drbenvincent , @juanitorduz how do you think we should handle the Jax/Numpyro install. I've modified the IV class here to sample the PPC using the experimental JAX flag @jessegrabowski recomended, but i'm unsure if you want to make this a default. |
Just a quick comment based on an initial look on my phone... This seems to remove sampling from the prior altogether? |
It did, but need not stay that way... Jessie's trick only seemed to work for posterior sampling, so prior sampling of mvNormal remains slow on prior checks. However, I could keep the prior sampling but only sample the beta parameters which is fast. Could also just default to only sample for the IV class and show how to do prior and posterior checks in the notebook after the original fit... Options sort of depend on what you want to do with Jax and how integral it should be to CausalPy installation? |
You can do it for prior as well, but you have to freeze the model before you sample, as in:
I am going to open an issue for JAX forward sampling support, because it's really nice and all these hoops are silly. |
Failing remote tests will be fixed when #346 is merged |
What would be the main con's of adding that as a dependency? |
I guess it's just heavier and @jessegrabowski 's trick to speed up the mvNormal ppc, just seems hacky and maybe things change down the road... On the plus side you enable numpyro sampling which is great. I think we should enable it but not bake the dependency into the model fit step. Instead, code defensively. Keep the IV fit method light but demonstrate fast ppc usage in the notebook docs.... |
The preference is to stay light, but if we get nifty new functionality then I don't see a fundamental problem with adding dependencies. So in your proposal you'd use a cell magic which conda installs numpyro so that it's just there locally. That should work. It's also worth remembering that in the tests/doctests the IV ones are the slowest. If they can be sped up then that would be great. But that probably would require adding dependencies? |
PS if you update from |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #345 +/- ##
==========================================
- Coverage 79.98% 79.96% -0.03%
==========================================
Files 21 21
Lines 1634 1642 +8
==========================================
+ Hits 1307 1313 +6
- Misses 327 329 +2 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Nathaniel <[email protected]>
Signed-off-by: Nathaniel <[email protected]>
Signed-off-by: Nathaniel <[email protected]>
Think I'm in a bit of a catch 22 re: failing tests. Added new test fails in github action because we require Jax installed in the deployment environment. Remove thar function call and test coverage fails... |
Signed-off-by: Nathaniel <[email protected]>
Added further discussion on why IV regression is particularly well-suited to bayesian inference methods |
Signed-off-by: Nathaniel <[email protected]>
Signed-off-by: Nathaniel <[email protected]>
Signed-off-by: Nathaniel <[email protected]>
Signed-off-by: Nathaniel <[email protected]>
Signed-off-by: Nathaniel <[email protected]>
Signed-off-by: Nathaniel <[email protected]>
Signed-off-by: Nathaniel <[email protected]>
Thanks adjusted. Added link to wikipedia article on the credibility revolution. It's useful language to have. View entire conversation on ReviewNB |
Removed LATE from title and added glossary link View entire conversation on ReviewNB |
Hid code and expanded explanation View entire conversation on ReviewNB |
Hid code View entire conversation on ReviewNB |
Hid code and expanded explanation View entire conversation on ReviewNB |
Done. View entire conversation on ReviewNB |
Added more signposting View entire conversation on ReviewNB |
Checked headers View entire conversation on ReviewNB |
Yep. Added View entire conversation on ReviewNB |
Added a one-liner View entire conversation on ReviewNB |
yep, removed. View entire conversation on ReviewNB |
added! View entire conversation on ReviewNB |
Hid code View entire conversation on ReviewNB |
I wasn't sure about changing the DAG here. I'm not sure it adds more as it's still the View entire conversation on ReviewNB |
Added in the detail View entire conversation on ReviewNB |
Adjusted View entire conversation on ReviewNB |
Updated View entire conversation on ReviewNB |
View / edit / reply to this conversation on ReviewNB drbenvincent commented on 2024-06-18T11:09:46Z duplicated word "interest interest" |
View / edit / reply to this conversation on ReviewNB drbenvincent commented on 2024-06-18T11:09:47Z Great. Can you also add in a link "replication crisis" as a specific term simply because I've just heard that much more than credibility revolution. Link: https://en.wikipedia.org/wiki/Replication_crisis |
View / edit / reply to this conversation on ReviewNB drbenvincent commented on 2024-06-18T11:09:48Z Thanks for adding LATE to the glossary. Can you add in the glossary link to the first mention of LATE please? |
View / edit / reply to this conversation on ReviewNB drbenvincent commented on 2024-06-18T11:09:49Z repetition of "at least" |
Really nice, much clearer I think. Just a few minor edits and it's ready to merge :) |
Signed-off-by: Nathaniel <[email protected]>
Signed-off-by: Nathaniel <[email protected]>
Just a draft PR for the moment.
Pretty happy with the example. Need to add some more write up and discuss if we want to add JAX/Numpyro as a dependency to the package.