Skip to contents

Create and Tidy Dags

tidy_dagitty()
Tidy a dagitty object
as_tidy_dagitty()
Convert objects into tidy_dagitty objects
dagify()
Create a dagitty DAG using R-like syntax
dag()
Create a dagitty DAG
coords2df() coords2list()
Manipulate DAG coordinates
time_ordered_coords()
Create a time-ordered coordinate data frame
`label<-`() dag_label() label() has_labels()
DAG labels
simulate_data()
Simulate Data from Structural Equation Model
pull_dag() pull_dag_data() `update_dag_data<-`() update_dag() `update_dag<-`()
Pull components from DAG objects

Analyzing and Plotting DAGs

node_canonical() ggdag_canonical()
Canonicalize a DAG
node_collider() ggdag_collider()
Find colliders
node_dconnected() node_dseparated() node_drelationship() ggdag_drelationship() ggdag_dseparated() ggdag_dconnected()
D-relationship between variables
node_equivalent_dags() ggdag_equivalent_dags() node_equivalent_class() ggdag_equivalent_class()
Generating Equivalent Models
node_exogenous() ggdag_exogenous()
Find Exogenous Variables
node_instrumental() ggdag_instrumental()
Find Instrumental Variables
node_status() ggdag_status()
Find variable status
node_children() node_parents() node_ancestors() node_descendants() node_markov_blanket() node_adjacent() ggdag_children() ggdag_parents() ggdag_ancestors() ggdag_descendants() ggdag_markov_blanket() ggdag_adjacent()
Familial relationships between variables
dag_adjustment_sets() ggdag_adjustment_set()
Covariate Adjustment Sets
`label<-`() dag_label() label() has_labels()
DAG labels
dag_paths() ggdag_paths() ggdag_paths_fan()
Find Open Paths Between Variables
control_for() adjust_for() ggdag_adjust()
Adjust for variables and activate any biasing paths that result
ggdag()
Quickly plot a DAG in ggplot2
ggdag_classic()
Quickly plot a DAG in ggplot2
m_bias() butterfly_bias() confounder_triangle() collider_triangle() mediation_triangle() ggdag_m_bias() ggdag_butterfly_bias() ggdag_confounder_triangle() ggdag_collider_triangle() ggdag_mediation_triangle()
Quickly create a DAGs with common structures of bias
activate_collider_paths()
Activate paths opened by stratifying on a collider
is_collider() is_downstream_collider()
Detecting colliders in DAGs
is_confounder()
Assess if a variable confounds a relationship
is.tidy_dagitty()
Test for object class for tidy_dagitty

ggplot2 geoms, themes, and scales

geom_dag_collider_edges()
Edges for paths activated by stratification on colliders
geom_dag_edges_link() geom_dag_edges_arc() geom_dag_edges_diagonal() geom_dag_edges_fan()
Directed DAG edges
geom_dag_edges()
Directed and bidirected DAG edges
geom_dag_label()
Node text labels
geom_dag_text()
Node text
geom_dag_node() geom_dag_point()
DAG Nodes
geom_dag_text_repel() geom_dag_label_repel()
Repulsive textual annotations
theme_dag_blank() theme_dag() theme_dag_grid()
Minimalist DAG themes
theme_dag_grey() theme_dag_gray() theme_dag_grey_grid() theme_dag_gray_grid()
Simple grey themes for DAGs
scale_adjusted() scale_dag()
Common scale adjustments for DAGs

Common Structures of Bias

Misc