Skip to content

Commit

Permalink
fix dagitty
Browse files Browse the repository at this point in the history
  • Loading branch information
nhejazi committed Sep 21, 2024
1 parent be882d9 commit 2931693
Show file tree
Hide file tree
Showing 2 changed files with 233 additions and 82 deletions.
19 changes: 9 additions & 10 deletions 04-roadmap.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -417,16 +417,15 @@ library(dagitty)
library(ggdag)
# make DAG by specifying dependence structure
dag <- dagitty(
"dag {
W -> A
W -> Y
A -> Y
W -> A -> Y
}"
)
exposures(dag) <- c("A")
outcomes(dag) <- c("Y")
dag <- dagitty("dag{
W -> A ;
W -> Y ;
A -> Y ;
W -> A -> Y ;
W [confounders]
A [exposure]
Y [outcome]
}")
tidy_dag <- tidy_dagitty(dag)
# visualize DAG
Expand Down
Loading

0 comments on commit 2931693

Please sign in to comment.