Skip to content
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

Suggested change in moral graphs: lines connected to adjusted variables disappear #71

Open
HeikoBreitsohl opened this issue May 15, 2023 · 2 comments

Comments

@HeikoBreitsohl
Copy link

Thanks for a great tool!

In order to align the moral graph feature more closely with Shrier & Platt (2008), I would suggest that, when setting variables to "adjusted", lines connected to those variables to any other variables should disappear from the moral graph (but not from the normal view, of course). This would correspond to Step 6 in S&P.

For background: The DAGitty manual cites S&P when describing moral graphs. When teaching DAGitty, I find it difficult to explain to students why the result in DAGitty looks different from that in S&P, even though the principles are the same.
Aside from teaching, as the paths connecting the adjusted variables are blocked, should those lines (in the moral graph) not disappear anyway?

Thanks!
Heiko

@jtextor
Copy link
Owner

jtextor commented May 22, 2023

Hi Heiko, thank you for the suggestion. The term "moral graph" is usually reserved for the transformation where we just link all parents of the same node with undirected arrows and then remove all arrowheads. The specific construction in S&P is technically the moral graph of the ancestral graph of the proper back-door graph -- in words, this is made by first removing all first edges on proper causal paths, then removing all non-ancestors of X, Y, Z, and only then performing moralization. In that sense maybe the citation in the manual is wrong rather than what dagitty currently does.

However it would be easy to add the view you're requesting as another option to the menu (called something like ancestor moral back-door graph) as this is calculated internally anyway when computing adjustment sets. Thoughts?

@HeikoBreitsohl
Copy link
Author

Hi Johannes, thanks for your response!
Your explanation makes perfect sense to me. As I look at this issue primarily from teaching perspective, I think having both options available would be great. I like to make students create and use their own DAGs manually first, after which they can check whether DAGitty "agrees".

By the way, it seems to me that the moral graph is a good segway from DAGs to UAGs. Would you agree? If yes, are you aware of an accessible piece of literature that explains UAGs (vs. DAGs)?

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

No branches or pull requests

2 participants