Skip to content

Add pre-test post-test non equivalent group design details to the Knowledge Base #517

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

Merged
merged 8 commits into from
Aug 5, 2025

Conversation

drbenvincent
Copy link
Collaborator

@drbenvincent drbenvincent commented Aug 1, 2025

We were previously missing this. And I was also looking at the ANCOVA page and realised it needed some work. This PR lays some groundwork for improving the ANCOVA docs/page, but doesn't touch it yet. So far, we just add info into the knowledge base docs page.

Note: This PR also updates the dependency from daft to daft-pgm. This is to keep up with a change of the package name on pypi.

Very happy to get any corrections, or feedback to improve clarity or accuracy. I think that's particularly important in this case because I made up this DAG myself - it doesn't feature in any of the (many) causal inference books I have. There's a chance a DAG has been put together in a published paper that I've not seen, so happy to hear about that if you know of such a paper?


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

@drbenvincent drbenvincent added the documentation Improvements or additions to documentation label Aug 1, 2025
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 Aug 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.19%. Comparing base (09adfd7) to head (6d2e5a7).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #517   +/-   ##
=======================================
  Coverage   95.19%   95.19%           
=======================================
  Files          28       28           
  Lines        2457     2457           
=======================================
  Hits         2339     2339           
  Misses        118      118           

☔ 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.

@drbenvincent
Copy link
Collaborator Author

drbenvincent commented Aug 1, 2025

Actually, is it worth mentioning more backdoor paths:

  • $T \leftarrow Y_0 \leftarrow U \to Y_1$. But blocked by observing $Y_0$
  • $T \leftarrow X \rightarrow Y_0 \leftarrow U \rightarrow Y_1$, but blocked by observing $Y_0$ and $X$
  • $T \leftarrow Y_0 \leftarrow X \rightarrow Y_1$, but blocked by observing $Y_0$ and $X$

@drbenvincent
Copy link
Collaborator Author

Maybe I need not mention ANCOVA specifically. Just say 'linear model'.

@drbenvincent
Copy link
Collaborator Author

Just noticed... what I currently have listed as backdoor path 3 is of course easily closed by observing $Y_0$

@drbenvincent
Copy link
Collaborator Author

drbenvincent commented Aug 3, 2025

  • DAGS -> DAGs

@NathanielF
Copy link
Contributor

DAG looks good to me and Daggity:

Assume Us are latent but non-influencing

image

but breaks if as you say u2 can't be ignored

image

@@ -16,7 +16,7 @@
},
Copy link
Contributor

@NathanielF NathanielF Aug 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ability to discount or ignore U2 is crucial.


Reply via ReviewNB

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a case of conditional ignorability....

@@ -16,7 +16,7 @@
},
Copy link
Contributor

@NathanielF NathanielF Aug 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if it's worth pivoting out of this example and saying something now about identification in general in causal inference. This ANCOVA is a strong example... to jump off and discuss how all the strategies above are identification strategies.


Reply via ReviewNB

Copy link
Contributor

@NathanielF NathanielF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Added a note about maybe generalising your discussion of identification - leaping off the ANCOVA example to reflect on the set of DAGs above... but just a suggestion. Not blocking for this PR...

@drbenvincent drbenvincent changed the title Add causal DAG in the knowledge base for the pre-test post-test non equivalent group design Add pre-test post-test non equivalent group design details to the Knowledge Base Aug 5, 2025
@drbenvincent drbenvincent merged commit 07e1119 into main Aug 5, 2025
9 checks passed
@drbenvincent drbenvincent deleted the ancova branch August 5, 2025 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants