Created
September 22, 2019 07:57
-
-
Save peterdalle/0333e1fda48495cac40faae0da36bc95 to your computer and use it in GitHub Desktop.
Gin & tonic <--> brain size DAG
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(ggdag) | |
gin_dag <- dagify(happy ~ gin_tonic, | |
brain_size ~ happy, | |
gin_tonic ~ brain_size, | |
labels = c("brain_size" = "Hjärnstorlek", | |
"gin_tonic" = "Gin & Tonic", | |
"happy" = "Glad"), | |
exposure = "gin_tonic", | |
outcome = "brain_size") %>% | |
tidy_dagitty() | |
ggdag(gin_dag, text = FALSE, use_labels = "label") + | |
theme_void() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
DAG as in Directed Alcohol Graph.