diff --git a/R/geom_dag.R b/R/geom_dag.R index b4a77310..fe4c6fb3 100644 --- a/R/geom_dag.R +++ b/R/geom_dag.R @@ -653,7 +653,7 @@ geom_dag_collider_edges <- function(mapping = NULL, data = NULL, params = list( size = size, arrow = arrow, - strength = curvature, + curvature = curvature, angle = angle, ncp = ncp, lineend = lineend, diff --git a/_pkgdown.yml b/_pkgdown.yml index e11fcbc8..242d1e17 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -53,12 +53,14 @@ navbar: - icon: fa-home fa-lg href: index.html - text: Reference - href: /reference/index.html + href: reference/index.html - text: Articles menu: - text: An Introduction to ggdag - href: /articles/intro-to-ggdag.html + href: articles/intro-to-ggdag.html - text: An Introduction to DAGs - href: /articles/intro-to-dags.html + href: articles/intro-to-dags.html - text: Common Structures of Bias - href: /articles/bias-structures.html + href: articles/bias-structures.html + - text: News + href: news/index.html diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index 2e5fc589..d4c3750a 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -1,6 +1,6 @@ - + @@ -9,17 +9,17 @@ License • ggdag - + - + - + - + - + @@ -35,7 +35,8 @@ - + + - + @@ -9,17 +9,17 @@ MIT License • ggdag - + - + - + - + - + @@ -35,7 +35,8 @@ - + + + Common Structures of Bias • ggdag - - - + + + - @@ -22,14 +22,15 @@
@@ -240,41 +244,41 @@

Selection bias

We have already seen a few examples of selection bias, but let’s consider a couple more that are potential pitfalls in common design types. Let’s say we’re doing a case-control study and want to assess the effect of smoking on glioma, a type of brain cancer. We have a group of glioma patients at a hospital and want to compare them to a group of controls, so we pick people in the hospital with a broken bone, since that seems to have nothing to do with brain cancer. However, perhaps there is some unknown confounding between smoking and being in the hospital with a broken bone, like being prone to reckless behavior. In the normal population, there is no causal effect of smoking on glioma, but in our case, we’re selecting on people who have been hospitalized, which opens up a back-door path:

-
coords <- tibble::tribble(
-  ~name,           ~x,  ~y,
-  "glioma",         1,   2,
-  "hospitalized",   2,   3,
-  "broken_bone",    3,   2,
-  "reckless",       4,   1,
-  "smoking",        5,   2
-)
-
-dagify(hospitalized ~ broken_bone + glioma,
-       broken_bone ~ reckless,
-       smoking ~ reckless,
-       labels = c(hospitalized = "Hospitalization",
-                  broken_bone = "Broken Bone",
-                  glioma = "Glioma",
-                  reckless = "Reckless \nBehavior",
-                  smoking = "Smoking"),
-       coords = coords) %>% 
-  ggdag_dconnected("glioma", "smoking", controlling_for = "hospitalized", 
-                   text = FALSE, use_labels = "label", collider_lines = FALSE)
+
coords <- tibble::tribble(
+  ~name,           ~x,  ~y,
+  "glioma",         1,   2,
+  "hospitalized",   2,   3,
+  "broken_bone",    3,   2,
+  "reckless",       4,   1,
+  "smoking",        5,   2
+)
+
+dagify(hospitalized ~ broken_bone + glioma,
+       broken_bone ~ reckless,
+       smoking ~ reckless,
+       labels = c(hospitalized = "Hospitalization",
+                  broken_bone = "Broken Bone",
+                  glioma = "Glioma",
+                  reckless = "Reckless \nBehavior",
+                  smoking = "Smoking"),
+       coords = coords) %>% 
+  ggdag_dconnected("glioma", "smoking", controlling_for = "hospitalized", 
+                   text = FALSE, use_labels = "label", collider_lines = FALSE)

Even though smoking doesn’t actually cause glioma, it will appear as if there is an association. Actually, in this case, it may make smoking appear to be protective against glioma, since controls are more likely to be smokers.

Let’s also consider how bias arises in loss-to-follow-up. In a randomized clinical trial or cohort study, the main threat of selection bias is not through who enters the study (although that may affect generalizability) but who leaves it. If loss-to-follow-up is associated with the exposure or outcome, the relationship between the two may be biased. Let’s consider a trial where we are testing a new HIV drug and its effect on CD4 white blood cell count. If the treatment causes symptoms, participants may leave the trial. Similarly, there may be those whose HIV is getting worse and thus more symptomatic, which also may cause people to leave the trial. If we only have information on people who stay in the study, we are stratifying by follow-up status:

-
dagify(follow_up ~ symptoms,
-       symptoms ~ new_rx + dx_severity,
-       cd4 ~ dx_severity,
-       labels = c(
-         follow_up = "Follow-Up",
-         symptoms = "Symptoms",
-         new_rx = "New HIV Drug",
-         dx_severity = "Underyling \nHIV Severity",
-         cd4 = "CD4 Count"
-       )) %>% 
-  ggdag_adjust("follow_up", layout = "mds", text = FALSE, 
-               use_labels = "label", collider_lines = FALSE)
+
dagify(follow_up ~ symptoms,
+       symptoms ~ new_rx + dx_severity,
+       cd4 ~ dx_severity,
+       labels = c(
+         follow_up = "Follow-Up",
+         symptoms = "Symptoms",
+         new_rx = "New HIV Drug",
+         dx_severity = "Underyling \nHIV Severity",
+         cd4 = "CD4 Count"
+       )) %>% 
+  ggdag_adjust("follow_up", layout = "mds", text = FALSE, 
+               use_labels = "label", collider_lines = FALSE)

But follow-up is downstream from a collider, symptoms. Controlling for a downstream collider induces bias and, because we only have information on people who remain in the study, we are inadvertently stratifying on follow-up status (see the vignette introducing DAGs for more on downstream colliders). Thus, the effect estimate between the HIV drug and CD4 count will be biased.

@@ -312,9 +316,8 @@

-

Site built with pkgdown.

+

Site built with pkgdown 1.3.0.

- diff --git a/docs/articles/bias-structures_files/figure-html/unnamed-chunk-4-1.png b/docs/articles/bias-structures_files/figure-html/unnamed-chunk-4-1.png index 5292e9e7..f2fae291 100644 Binary files a/docs/articles/bias-structures_files/figure-html/unnamed-chunk-4-1.png and b/docs/articles/bias-structures_files/figure-html/unnamed-chunk-4-1.png differ diff --git a/docs/articles/bias-structures_files/figure-html/unnamed-chunk-6-1.png b/docs/articles/bias-structures_files/figure-html/unnamed-chunk-6-1.png index ab52196d..84ee7903 100644 Binary files a/docs/articles/bias-structures_files/figure-html/unnamed-chunk-6-1.png and b/docs/articles/bias-structures_files/figure-html/unnamed-chunk-6-1.png differ diff --git a/docs/articles/index.html b/docs/articles/index.html index dbdb5fed..56c01b24 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -1,6 +1,6 @@ - + @@ -9,17 +9,17 @@ Articles • ggdag - + - + - + - + - + @@ -35,7 +35,8 @@ - + + + An Introduction to Directed Acyclic Graphs • ggdag - - - + + + - @@ -22,14 +22,15 @@
-

Site built with pkgdown.

+

Site built with pkgdown 1.3.0.

- diff --git a/docs/articles/intro-to-dags_files/figure-html/unnamed-chunk-10-1.png b/docs/articles/intro-to-dags_files/figure-html/unnamed-chunk-10-1.png index 07feece3..221297c8 100644 Binary files a/docs/articles/intro-to-dags_files/figure-html/unnamed-chunk-10-1.png and b/docs/articles/intro-to-dags_files/figure-html/unnamed-chunk-10-1.png differ diff --git a/docs/articles/intro-to-dags_files/figure-html/unnamed-chunk-11-1.png b/docs/articles/intro-to-dags_files/figure-html/unnamed-chunk-11-1.png index 5c809e44..50e91e35 100644 Binary files a/docs/articles/intro-to-dags_files/figure-html/unnamed-chunk-11-1.png and b/docs/articles/intro-to-dags_files/figure-html/unnamed-chunk-11-1.png differ diff --git a/docs/articles/intro-to-ggdag.html b/docs/articles/intro-to-ggdag.html index bec76843..2aa841cc 100644 --- a/docs/articles/intro-to-ggdag.html +++ b/docs/articles/intro-to-ggdag.html @@ -1,18 +1,18 @@ - + An Introduction to ggdag • ggdag - - - + + + - @@ -22,14 +22,15 @@
-

Site built with pkgdown.

+

Site built with pkgdown 1.3.0.

- diff --git a/docs/articles/intro-to-ggdag_files/figure-html/ggdag_adjustment_-1.png b/docs/articles/intro-to-ggdag_files/figure-html/ggdag_adjustment_-1.png index 222dc2c1..75cffa10 100644 Binary files a/docs/articles/intro-to-ggdag_files/figure-html/ggdag_adjustment_-1.png and b/docs/articles/intro-to-ggdag_files/figure-html/ggdag_adjustment_-1.png differ diff --git a/docs/articles/intro-to-ggdag_files/figure-html/ggdag_layout-1.png b/docs/articles/intro-to-ggdag_files/figure-html/ggdag_layout-1.png index e59e895b..56cc194f 100644 Binary files a/docs/articles/intro-to-ggdag_files/figure-html/ggdag_layout-1.png and b/docs/articles/intro-to-ggdag_files/figure-html/ggdag_layout-1.png differ diff --git a/docs/articles/intro-to-ggdag_files/figure-html/ggdag_parents-1.png b/docs/articles/intro-to-ggdag_files/figure-html/ggdag_parents-1.png index 3abaf845..cc473dbf 100644 Binary files a/docs/articles/intro-to-ggdag_files/figure-html/ggdag_parents-1.png and b/docs/articles/intro-to-ggdag_files/figure-html/ggdag_parents-1.png differ diff --git a/docs/articles/intro-to-ggdag_files/figure-html/ggdag_path-1.png b/docs/articles/intro-to-ggdag_files/figure-html/ggdag_path-1.png index 6066c60d..de9fe6d5 100644 Binary files a/docs/articles/intro-to-ggdag_files/figure-html/ggdag_path-1.png and b/docs/articles/intro-to-ggdag_files/figure-html/ggdag_path-1.png differ diff --git a/docs/authors.html b/docs/authors.html index f1a7ab82..0ed781a6 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -1,6 +1,6 @@ - + @@ -9,17 +9,17 @@ Authors • ggdag - + - + - + - + - + @@ -35,7 +35,8 @@ - + + + Analyze and Create Elegant Directed Acyclic Graphs • ggdag - - - + + + - + - @@ -27,14 +28,15 @@
+ - - - + +
@@ -100,110 +105,110 @@

Installation

You can install ggdag with:

- +

Or you can install the development version from GitHub with:

- +
# install.packages("devtools")
+devtools::install_github("malcolmbarrett/ggdag")

Example

ggdag makes it easy to use dagitty in the context of the tidyverse. You can directly tidy dagitty objects or use convenience functions to create DAGs using a more R-like syntax:

-
library(ggdag)
-
-#  example from the dagitty package
-dag <- dagitty::dagitty( "dag {
-    y <- x <- z1 <- v -> z2 -> y
-               z1 <- w1 <-> w2 -> z2
-               x <- w1 -> y
-               x <- w2 -> y
-               x [exposure]
-               y [outcome]
-               }")
-
-tidy_dag <- tidy_dagitty(dag)
-
-tidy_dag 
-#> # A DAG with 7 nodes and 12 edges
-#> #
-#> # Exposure: x
-#> # Outcome: y
-#> #
-#> # A tibble: 13 x 8
-#>    name      x     y direction to     xend  yend circular
-#>    <chr> <dbl> <dbl> <fct>     <chr> <dbl> <dbl> <lgl>   
-#>  1 v     11.8   8.03 ->        z1    10.4   7.77 FALSE   
-#>  2 v     11.8   8.03 ->        z2    12.1   6.66 FALSE   
-#>  3 w1    10.2   6.85 ->        x      9.95  6.28 FALSE   
-#>  4 w1    10.2   6.85 ->        y     11.1   6.39 FALSE   
-#>  5 w1    10.2   6.85 ->        z1    10.4   7.77 FALSE   
-#>  6 w1    10.2   6.85 <->       w2    10.9   5.75 FALSE   
-#>  7 w2    10.9   5.75 ->        x      9.95  6.28 FALSE   
-#>  8 w2    10.9   5.75 ->        y     11.1   6.39 FALSE   
-#>  9 w2    10.9   5.75 ->        z2    12.1   6.66 FALSE   
-#> 10 x      9.95  6.28 ->        y     11.1   6.39 FALSE   
-#> 11 z1    10.4   7.77 ->        x      9.95  6.28 FALSE   
-#> 12 z2    12.1   6.66 ->        y     11.1   6.39 FALSE   
-#> 13 y     11.1   6.39 <NA>      <NA>  NA    NA    FALSE
-
-#  using more R-like syntax to create the same DAG
-tidy_ggdag <- dagify(y ~ x + z2 + w2 + w1,
-             x ~ z1 + w1 + w2,
-             z1 ~ w1 + v,
-             z2 ~ w2 + v,
-             w1 ~~ w2, # bidirected path
-             exposure = "x",
-             outcome = "y") %>% tidy_dagitty()
-
-tidy_ggdag
-#> # A DAG with 7 nodes and 12 edges
-#> #
-#> # Exposure: x
-#> # Outcome: y
-#> #
-#> # A tibble: 13 x 8
-#>    name      x     y direction to     xend  yend circular
-#>    <chr> <dbl> <dbl> <fct>     <chr> <dbl> <dbl> <lgl>   
-#>  1 v      9.30  13.4 ->        z1     9.74  12.1 FALSE   
-#>  2 v      9.30  13.4 ->        z2     7.96  13.0 FALSE   
-#>  3 w1     8.74  11.0 ->        x      8.86  11.6 FALSE   
-#>  4 w1     8.74  11.0 ->        y      7.68  11.5 FALSE   
-#>  5 w1     8.74  11.0 ->        z1     9.74  12.1 FALSE   
-#>  6 w1     8.74  11.0 <->       w2     8.00  12.0 FALSE   
-#>  7 w2     8.00  12.0 ->        x      8.86  11.6 FALSE   
-#>  8 w2     8.00  12.0 ->        y      7.68  11.5 FALSE   
-#>  9 w2     8.00  12.0 ->        z2     7.96  13.0 FALSE   
-#> 10 x      8.86  11.6 ->        y      7.68  11.5 FALSE   
-#> 11 z1     9.74  12.1 ->        x      8.86  11.6 FALSE   
-#> 12 z2     7.96  13.0 ->        y      7.68  11.5 FALSE   
-#> 13 y      7.68  11.5 <NA>      <NA>  NA     NA   FALSE
+
library(ggdag)
+
+#  example from the dagitty package
+dag <- dagitty::dagitty( "dag {
+    y <- x <- z1 <- v -> z2 -> y
+               z1 <- w1 <-> w2 -> z2
+               x <- w1 -> y
+               x <- w2 -> y
+               x [exposure]
+               y [outcome]
+               }")
+
+tidy_dag <- tidy_dagitty(dag)
+
+tidy_dag 
+#> # A DAG with 7 nodes and 12 edges
+#> #
+#> # Exposure: x
+#> # Outcome: y
+#> #
+#> # A tibble: 13 x 8
+#>    name      x     y direction to     xend  yend circular
+#>    <chr> <dbl> <dbl> <fct>     <chr> <dbl> <dbl> <lgl>   
+#>  1 v     11.8   8.03 ->        z1    10.4   7.77 FALSE   
+#>  2 v     11.8   8.03 ->        z2    12.1   6.66 FALSE   
+#>  3 w1    10.2   6.85 ->        x      9.95  6.28 FALSE   
+#>  4 w1    10.2   6.85 ->        y     11.1   6.39 FALSE   
+#>  5 w1    10.2   6.85 ->        z1    10.4   7.77 FALSE   
+#>  6 w1    10.2   6.85 <->       w2    10.9   5.75 FALSE   
+#>  7 w2    10.9   5.75 ->        x      9.95  6.28 FALSE   
+#>  8 w2    10.9   5.75 ->        y     11.1   6.39 FALSE   
+#>  9 w2    10.9   5.75 ->        z2    12.1   6.66 FALSE   
+#> 10 x      9.95  6.28 ->        y     11.1   6.39 FALSE   
+#> 11 z1    10.4   7.77 ->        x      9.95  6.28 FALSE   
+#> 12 z2    12.1   6.66 ->        y     11.1   6.39 FALSE   
+#> 13 y     11.1   6.39 <NA>      <NA>  NA    NA    FALSE
+
+#  using more R-like syntax to create the same DAG
+tidy_ggdag <- dagify(y ~ x + z2 + w2 + w1,
+             x ~ z1 + w1 + w2,
+             z1 ~ w1 + v,
+             z2 ~ w2 + v,
+             w1 ~~ w2, # bidirected path
+             exposure = "x",
+             outcome = "y") %>% tidy_dagitty()
+
+tidy_ggdag
+#> # A DAG with 7 nodes and 12 edges
+#> #
+#> # Exposure: x
+#> # Outcome: y
+#> #
+#> # A tibble: 13 x 8
+#>    name      x     y direction to     xend  yend circular
+#>    <chr> <dbl> <dbl> <fct>     <chr> <dbl> <dbl> <lgl>   
+#>  1 v      9.30  13.4 ->        z1     9.74  12.1 FALSE   
+#>  2 v      9.30  13.4 ->        z2     7.96  13.0 FALSE   
+#>  3 w1     8.74  11.0 ->        x      8.86  11.6 FALSE   
+#>  4 w1     8.74  11.0 ->        y      7.68  11.5 FALSE   
+#>  5 w1     8.74  11.0 ->        z1     9.74  12.1 FALSE   
+#>  6 w1     8.74  11.0 <->       w2     8.00  12.0 FALSE   
+#>  7 w2     8.00  12.0 ->        x      8.86  11.6 FALSE   
+#>  8 w2     8.00  12.0 ->        y      7.68  11.5 FALSE   
+#>  9 w2     8.00  12.0 ->        z2     7.96  13.0 FALSE   
+#> 10 x      8.86  11.6 ->        y      7.68  11.5 FALSE   
+#> 11 z1     9.74  12.1 ->        x      8.86  11.6 FALSE   
+#> 12 z2     7.96  13.0 ->        y      7.68  11.5 FALSE   
+#> 13 y      7.68  11.5 <NA>      <NA>  NA     NA   FALSE

ggdag also provides functionality for analyzing DAGs and plotting them in ggplot2:

-
ggdag(tidy_ggdag) +
-  theme_dag()
-

- -

+
ggdag(tidy_ggdag) +
+  theme_dag()
+

+
ggdag_adjustment_set(tidy_ggdag, node_size = 14) + 
+  theme(legend.position = "bottom")
+

As well as geoms and other functions for plotting them directly in ggplot2:

- -

+
dagify(m ~ x + y) %>% 
+  tidy_dagitty() %>% 
+  node_dconnected("x", "y", controlling_for = "m") %>%
+  ggplot(aes(x = x, y = y, xend = xend, yend = yend, shape = adjusted, col = d_relationship)) +
+    geom_dag_edges(aes(end_cap = ggraph::circle(10, "mm"))) +
+    geom_dag_collider_edges() +
+    geom_dag_point() +
+    geom_dag_text(col = "white") +
+    theme_dag() + 
+    scale_adjusted() +
+    expand_plot(expand_y = expand_scale(c(0.2, 0.2))) +
+    scale_color_hue(name = "d-relationship", na.value = "grey75") 
+

And common structures of bias:

- -

-

-ggdag_butterfly_bias(edge_type = "diagonal")
-

+ +

+

+ggdag_butterfly_bias(edge_type = "diagonal")
+

@@ -212,11 +217,11 @@

@@ -231,7 +236,7 @@

License

Developers

@@ -253,13 +258,12 @@

Dev status

-

Site built with pkgdown.

+

Site built with pkgdown 1.3.0.

- - + diff --git a/docs/news/index.html b/docs/news/index.html new file mode 100644 index 00000000..dfd03113 --- /dev/null +++ b/docs/news/index.html @@ -0,0 +1,167 @@ + + + + + + + + +Changelog • ggdag + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+
+ + +
+

+ggdag 0.2.0 Unreleased +

+
    +
  • Fixed join bug in node_equivalent_class() that didn’t account for the way dagitty returns DAGs with no direction
  • +
  • Fixed join bug in node_equivalent_class() that didn’t check to node
  • +
  • Implemented is_false() to avoid dependency on R 3.5.0
  • +
  • improved edge lengths
  • +
  • add {} to adjustment set names to reflect convention
  • +
  • Set nodes to be unstyled by default
  • +
  • Changed default themes and scales to be more like base ggplot2
  • +
  • Added a NEWS.md file to track changes to the package.
  • +
+
+
+ + + +
+ + +
+ + + + + + diff --git a/docs/pkgdown.css b/docs/pkgdown.css index 6ca2f37a..c03fb08d 100644 --- a/docs/pkgdown.css +++ b/docs/pkgdown.css @@ -58,9 +58,14 @@ img { max-width: 100%; } +/* Fix bug in bootstrap (only seen in firefox) */ +summary { + display: list-item; +} + /* Typographic tweaking ---------------------------------*/ -.contents h1.page-header { +.contents .page-header { margin-top: calc(-60px + 1em); } @@ -136,10 +141,9 @@ a.anchor { .ref-index th {font-weight: normal;} .ref-index td {vertical-align: top;} +.ref-index .icon {width: 40px;} .ref-index .alias {width: 40%;} -.ref-index .title {width: 60%;} - -.ref-index .alias {width: 40%;} +.ref-index-icons .alias {width: calc(40% - 40px);} .ref-index .title {width: 60%;} .ref-arguments th {text-align: right; padding-right: 10px;} diff --git a/docs/pkgdown.js b/docs/pkgdown.js index de9bd724..eb7e83d2 100644 --- a/docs/pkgdown.js +++ b/docs/pkgdown.js @@ -25,9 +25,13 @@ for (var i = 0; i < links.length; i++) { if (links[i].getAttribute("href") === "#") continue; - var path = paths(links[i].pathname); + // Ignore external links + if (links[i].host !== location.host) + continue; + + var nav_path = paths(links[i].pathname); - var length = prefix_length(cur_path, path); + var length = prefix_length(nav_path, cur_path); if (length > max_length) { max_length = length; pos = i; @@ -52,13 +56,14 @@ return(pieces); } + // Returns -1 if not found function prefix_length(needle, haystack) { if (needle.length > haystack.length) - return(0); + return(-1); // Special case for length-0 haystack, since for loop won't run if (haystack.length === 0) { - return(needle.length === 0 ? 1 : 0); + return(needle.length === 0 ? 0 : -1); } for (var i = 0; i < haystack.length; i++) { @@ -78,9 +83,9 @@ element.setAttribute('data-original-title', tooltipOriginalTitle); } - if(Clipboard.isSupported()) { + if(ClipboardJS.isSupported()) { $(document).ready(function() { - var copyButton = ""; + var copyButton = ""; $(".examples, div.sourceCode").addClass("hasCopyButton"); @@ -91,7 +96,7 @@ $('.btn-copy-ex').tooltip({container: 'body'}); // Initialize clipboard: - var clipboardBtnCopies = new Clipboard('[data-clipboard-copy]', { + var clipboardBtnCopies = new ClipboardJS('[data-clipboard-copy]', { text: function(trigger) { return trigger.parentNode.textContent; } diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 5b243ff0..82542de3 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -1,11 +1,8 @@ -pandoc: 2.1.3 -pkgdown: 1.1.0.9000 -pkgdown_sha: 98bfe0fdfd59b33ef1a88ef6896cd60f805f0e81 +pandoc: 2.7.3 +pkgdown: 1.3.0 +pkgdown_sha: ~ articles: bias-structures: bias-structures.html intro-to-dags: intro-to-dags.html intro-to-ggdag: intro-to-ggdag.html -urls: - reference: https://malco.io/ggdag//reference - article: https://malco.io/ggdag//articles diff --git a/docs/reference/activate_collider_paths.html b/docs/reference/activate_collider_paths.html index 362a0afd..de0af5ee 100644 --- a/docs/reference/activate_collider_paths.html +++ b/docs/reference/activate_collider_paths.html @@ -1,6 +1,6 @@ - + @@ -9,17 +9,17 @@ Activate paths opened by stratifying on a collider — activate_collider_paths • ggdag - + - + - + - + - + @@ -40,7 +40,8 @@ - + + - + @@ -9,17 +9,17 @@ Covariate Adjustment Sets — Covariate Adjustment Sets • ggdag - + - + - + - + - + @@ -38,7 +38,8 @@ - + + - + @@ -9,17 +9,17 @@ Convert a <code>tidy_dagitty</code> object to data.frame — as.data.frame.tidy_dagitty • ggdag - + - + - + - + - + @@ -38,7 +38,8 @@ - + + - + @@ -9,17 +9,17 @@ Convert a <code>tidy_dagitty</code> object to tbl — as.tbl.tidy_daggity • ggdag - + - + - + - + - + @@ -38,7 +38,8 @@ - + + - + @@ -9,17 +9,17 @@ Convert DAGS to tidygraph — as_tbl_graph • ggdag - + - + - + - + - + @@ -40,7 +40,8 @@ - + + - + @@ -9,17 +9,17 @@ Canonicalize a DAG — Canonicalize DAGs • ggdag - + - + - + - + - + @@ -41,7 +41,8 @@ - + + - + @@ -9,17 +9,17 @@ Find colliders — Colliders • ggdag - + - + - + - + - + @@ -40,7 +40,8 @@ - + + - + @@ -9,17 +9,17 @@ Adjust for variables and activate any biasing paths that result — Adjust for variables • ggdag - + - + - + - + - + @@ -38,7 +38,8 @@ - + + - + @@ -9,17 +9,17 @@ Manipulate DAG coordinates — coordinates • ggdag - + - + - + - + - + @@ -38,7 +38,8 @@ - + + - + @@ -9,17 +9,17 @@ D-relationship between variables — Assess d-separation between variables • ggdag - + - + - + - + - + @@ -44,7 +44,8 @@ - + + - + @@ -9,17 +9,17 @@ Create a dagitty DAG — dag • ggdag - + - + - + - + - + @@ -38,7 +38,8 @@ - + + - + @@ -9,17 +9,17 @@ Create a dagitty DAG using R-like syntax — dagify • ggdag - + - + - + - + - + @@ -41,7 +41,8 @@ - + + - + @@ -9,17 +9,17 @@ Dplyr verb methods for <code>tidy_dagitty</code> objects — dplyr • ggdag - + - + - + - + - + @@ -38,7 +38,8 @@ - + + - + @@ -9,17 +9,17 @@ Generating Equivalent Models — Equivalent DAGs and Classes • ggdag - + - + - + - + - + @@ -44,7 +44,8 @@ - + + - + @@ -9,17 +9,17 @@ Find Exogenous Variables — Exogenous Variables • ggdag - + - + - + - + - + @@ -40,7 +40,8 @@ - + + - + @@ -9,17 +9,17 @@ Quickly scale the size of a ggplot — expand_plot • ggdag - + - + - + - + - + @@ -40,7 +40,8 @@ - + + - + @@ -9,17 +9,17 @@ Generate expansion vector for scales. — expand_scale • ggdag - + - + - + - + - + @@ -43,7 +43,8 @@ - + + - + @@ -9,17 +9,17 @@ Fortify a <code>tidy_dagitty</code> object for <code>ggplot2</code> — fortify • ggdag - + - + - + - + - + @@ -38,7 +38,8 @@ - + + - + @@ -9,17 +9,17 @@ Edges for paths activated by stratification on colliders — geom_dag_collider_edges • ggdag - + - + - + - + - + @@ -39,7 +39,8 @@ - + + - + @@ -9,17 +9,17 @@ Directed DAG edges — DAG Edges • ggdag - + - + - + - + - + @@ -38,7 +38,8 @@ - + + - + @@ -9,17 +9,17 @@ Directed and bidirected DAG edges — geom_dag_edges • ggdag - + - + - + - + - + @@ -38,7 +38,8 @@ - + + - + @@ -9,17 +9,17 @@ Node text — geom_dag_text • ggdag - + - + - + - + - + @@ -38,7 +38,8 @@ - + + - + @@ -9,17 +9,17 @@ Quickly plot a DAG in ggplot2 — ggdag • ggdag - + - + - + - + - + @@ -38,7 +38,8 @@ - + + - + @@ -9,17 +9,17 @@ Quickly plot a DAG in ggplot2 — ggdag_classic • ggdag - + - + - + - + - + @@ -39,7 +39,8 @@ - + + - + @@ -9,17 +9,17 @@ Create a new ggplot — ggplot.tidy_dagitty • ggdag - + - + - + - + - + @@ -38,7 +38,8 @@ - + + - + @@ -9,17 +9,17 @@ Function reference • ggdag - + - + - + - + - + @@ -35,7 +35,8 @@ - + + - + @@ -9,17 +9,17 @@ Find Instrumental Variables — Instrumental Variables • ggdag - + - + - + - + - + @@ -40,7 +40,8 @@ - + + - + @@ -9,17 +9,17 @@ Test for object class for tidy_dagitty — is.tidy_dagitty • ggdag - + - + - + - + - + @@ -38,7 +38,8 @@ - + + - + @@ -9,17 +9,17 @@ Detecting colliders in DAGs — Test if Variable Is Collider • ggdag - + - + - + - + - + @@ -38,7 +38,8 @@ - + + - + @@ -9,17 +9,17 @@ Assess if a variable confounds a relationship — is_confounder • ggdag - + - + - + - + - + @@ -38,7 +38,8 @@ - + + - + @@ -9,17 +9,17 @@ DAG labels — DAG Labels • ggdag - + - + - + - + - + @@ -39,7 +39,8 @@ - + + - + @@ -9,17 +9,17 @@ DAG Nodes — Nodes • ggdag - + - + - + - + - + @@ -41,7 +41,8 @@ - + + - + @@ -9,17 +9,17 @@ Find Pathways Between Variables — Pathways • ggdag - + - + - + - + - + @@ -39,7 +39,8 @@ - + + - + @@ -9,17 +9,17 @@ Pipe operator — %>% • ggdag - + - + - + - + - + @@ -38,7 +38,8 @@ - + + - + @@ -9,17 +9,17 @@ Print a <code>tidy_dagitty</code> — print.tidy_dagitty • ggdag - + - + - + - + - + @@ -38,7 +38,8 @@ - + + - + @@ -9,17 +9,17 @@ Quickly create a DAGs with common structures of bias — Quick Plots for Common DAGs • ggdag - + - + - + - + - + @@ -32,14 +32,15 @@ - - + + - + @@ -9,17 +9,17 @@ Objects exported from other packages — reexports • ggdag - + - + - + - + - + @@ -42,7 +42,8 @@ - + + - + @@ -9,17 +9,17 @@ Quickly remove plot axes and grids — remove_axes • ggdag - + - + - + - + - + @@ -40,7 +40,8 @@ - + + - + @@ -9,17 +9,17 @@ Repulsive textual annotations — ggrepel functions • ggdag - + - + - + - + - + @@ -42,7 +42,8 @@ - + + - + @@ -9,17 +9,17 @@ Common scale adjustments for DAGs — scale_adjusted • ggdag - + - + - + - + - + @@ -45,7 +45,8 @@ - + + - + @@ -9,17 +9,17 @@ Simulate Data from Structural Equation Model — simulate_data • ggdag - + - + - + - + - + @@ -42,7 +42,8 @@ - + + - + @@ -9,17 +9,17 @@ Find variable status — Variable Status • ggdag - + - + - + - + - + @@ -39,7 +39,8 @@ - + + - + @@ -9,17 +9,17 @@ Convert a <code>tidy_dagitty</code> object to tbl_df — tbl_df.tidy_daggity • ggdag - + - + - + - + - + @@ -38,7 +38,8 @@ - + + - + @@ -9,17 +9,17 @@ Minimalist DAG themes — theme_dag_blank • ggdag - + - + - + - + - + @@ -38,7 +38,8 @@ - + + - + @@ -9,17 +9,17 @@ Simple grey themes for DAGs — theme_dag_grey • ggdag - + - + - + - + - + @@ -38,7 +38,8 @@ - + + - + @@ -9,17 +9,17 @@ Tidy a <code>dagitty</code> object — tidy_dagitty • ggdag - + - + - + - + - + @@ -38,7 +38,8 @@ - + + - + @@ -9,17 +9,17 @@ Familial relationships between variables — Assess familial relationships between variables • ggdag - + - + - + - + - + @@ -43,7 +43,8 @@ - + +