Equivalent DAGs and Classes | R Documentation |
Returns a set of complete partially directed acyclic graphs (CPDAGs) given an
input DAG. CPDAGs are Markov equivalent to the input graph. See
dagitty::equivalentDAGs()
for details.
node_equivalent_dags()
returns a set of DAGs, while
node_equivalent_class()
tags reversable edges.
ggdag_equivalent_dags()
plots all equivalent DAGs, while
ggdag_equivalent_class()
plots all reversable edges as undirected.
node_equivalent_dags(.dag, n = 100, layout = "auto", ...)
ggdag_equivalent_dags(
.tdy_dag,
...,
node_size = 16,
text_size = 3.88,
label_size = text_size,
text_col = "white",
label_col = "black",
node = TRUE,
stylized = FALSE,
text = TRUE,
use_labels = NULL
)
node_equivalent_class(.dag, layout = "auto")
ggdag_equivalent_class(
.tdy_dag,
expand_x = expansion(c(0.1, 0.1)),
expand_y = expansion(c(0.1, 0.1)),
breaks = ggplot2::waiver(),
...,
node_size = 16,
text_size = 3.88,
label_size = text_size,
text_col = "white",
label_col = text_col,
node = TRUE,
stylized = FALSE,
text = TRUE,
use_labels = NULL
)
.dag |
input graph, an object of class |
n |
maximal number of returned graphs. |
layout |
a layout available in |
... |
optional arguments passed to |
.tdy_dag |
an object of class |
node_size |
size of DAG node |
text_size |
size of DAG text |
label_size |
size of label text |
text_col |
color of DAG text |
label_col |
color of label text |
node |
logical. Should nodes be included in the DAG? |
stylized |
logical. Should DAG nodes be stylized? If so, use
|
text |
logical. Should text be included in the DAG? |
use_labels |
a string. Variable to use for |
expand_x , expand_y |
Vector of range expansion constants used to add some
padding around the data, to ensure that they are placed some distance away
from the axes. Use the convenience function |
breaks |
One of:
|
a tidy_dagitty
with at least one DAG, including a dag
column to identify graph set for equivalent DAGs or a reversable
column for equivalent classes, or a ggplot
g_ex <- dagify(y ~ x + z, x ~ z)
g_ex %>% node_equivalent_class()
g_ex %>% ggdag_equivalent_dags()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.