Package: ggdag 0.2.13

Malcolm Barrett

ggdag: Analyze and Create Elegant Directed Acyclic Graphs

Tidy, analyze, and plot directed acyclic graphs (DAGs). 'ggdag' is built on top of 'dagitty', an R package that uses the 'DAGitty' web tool (<https://dagitty.net/>) for creating and analyzing DAGs. 'ggdag' makes it easy to tidy and plot 'dagitty' objects using 'ggplot2' and 'ggraph', as well as common analytic and graphical functions, such as determining adjustment sets and node relationships.

Authors:Malcolm Barrett [aut, cre]

ggdag_0.2.13.tar.gz
ggdag_0.2.13.tar.gz(r-4.5-noble)ggdag_0.2.13.tar.gz(r-4.4-noble)
ggdag_0.2.13.tgz(r-4.4-emscripten)ggdag_0.2.13.tgz(r-4.3-emscripten)
ggdag.pdf |ggdag.html
ggdag/json (API)
NEWS

# Install 'ggdag' in R:
install.packages('ggdag', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/r-causal/ggdag/issues

101 exports 1.95 score 59 dependencies 7 dependents 1.7k scripts 3.2k downloads

Last updated 2 months agofrom:79650a2a2a. Checks:OK: 2. Indexed: no.

TargetResultDate
Doc / VignettesOKAug 22 2024
R-4.5-linuxOKAug 22 2024

Exports:%>%activate_collider_pathsadjust_foras_tidy_dagittybutterfly_biascollider_triangleconfounder_trianglecontrol_forcoords2dfcoords2listdagdag_adjustment_setsdag_labeldag_pathsdagifyexpand_plotfiltergeom_dag_collider_edgesgeom_dag_edgesgeom_dag_edges_arcgeom_dag_edges_diagonalgeom_dag_edges_fangeom_dag_edges_linkgeom_dag_labelgeom_dag_label_repelgeom_dag_nodegeom_dag_pointgeom_dag_textgeom_dag_text_repelggdagggdag_adjacentggdag_adjustggdag_adjustment_setggdag_ancestorsggdag_butterfly_biasggdag_canonicalggdag_childrenggdag_classicggdag_colliderggdag_collider_triangleggdag_confounder_triangleggdag_dconnectedggdag_descendantsggdag_drelationshipggdag_dseparatedggdag_equivalent_classggdag_equivalent_dagsggdag_exogenousggdag_instrumentalggdag_m_biasggdag_markov_blanketggdag_mediation_triangleggdag_parentsggdag_pathsggdag_paths_fanggdag_statushas_labelsis_collideris_confounderis_downstream_collideris.tidy_dagittylabellabel<-m_biasmediation_trianglenode_adjacentnode_ancestorsnode_canonicalnode_childrennode_collidernode_dconnectednode_descendantsnode_drelationshipnode_dseparatednode_equivalent_classnode_equivalent_dagsnode_exogenousnode_instrumentalnode_markov_blanketnode_parentsnode_statuspull_dagpull_dag_dataremove_axesremove_gridscale_adjustedscale_dagsimulate_datatbl_df.tidy_daggitytheme_dagtheme_dag_blanktheme_dag_graytheme_dag_gray_gridtheme_dag_greytheme_dag_grey_gridtheme_dag_gridtidy_dagittytime_ordered_coordsupdate_dagupdate_dag_data<-update_dag<-

Dependencies:bootcachemclicolorspacecpp11curldagittydplyrfansifarverfastmapforcatsgenericsggforceggplot2ggraphggrepelgluegraphlayoutsgridExtragtableigraphisobandjsonlitelabelinglatticelifecyclemagrittrMASSMatrixmemoisemgcvmunsellnlmepillarpkgconfigpolyclippurrrR6RColorBrewerRcppRcppArmadilloRcppEigenrlangscalesstringistringrsystemfontstibbletidygraphtidyrtidyselecttweenrutf8V8vctrsviridisviridisLitewithr

An Introduction to Directed Acyclic Graphs

Rendered fromintro-to-dags.Rmdusingknitr::rmarkdownon Aug 22 2024.

Last update: 2024-07-23
Started: 2018-03-27

An Introduction to ggdag

Rendered fromintro-to-ggdag.Rmdusingknitr::rmarkdownon Aug 22 2024.

Last update: 2024-03-09
Started: 2018-03-27

Common Structures of Bias

Rendered frombias-structures.Rmdusingknitr::rmarkdownon Aug 22 2024.

Last update: 2024-03-09
Started: 2018-03-27

Readme and manuals

Help Manual

Help pageTopics
Activate paths opened by stratifying on a collideractivate_collider_paths
Adjust for variables and activate any biasing paths that resultAdjust for variables adjust_for control_for ggdag_adjust
Convert DAGS to tidygraphas_tbl_graph as_tbl_graph.dagitty as_tbl_graph.tidy_dagitty
Convert objects into 'tidy_dagitty' objectsas_tidy_dagitty as_tidy_dagitty.dagitty as_tidy_dagitty.data.frame
Convert a 'tidy_dagitty' object to data.frameas.data.frame.tidy_dagitty
Convert a 'tidy_dagitty' object to tblas.tbl.tidy_daggity as_tibble.tidy_daggity
D-relationship between variablesAssess d-separation between variables ggdag_dconnected ggdag_drelationship ggdag_dseparated node_dconnected node_drelationship node_dseparated
Familial relationships between variablesAssess familial relationships between variables ggdag_adjacent ggdag_ancestors ggdag_children ggdag_descendants ggdag_markov_blanket ggdag_parents node_adjacent node_ancestors node_children node_descendants node_markov_blanket node_parents
Canonicalize a DAGCanonicalize DAGs ggdag_canonical node_canonical
Find collidersColliders ggdag_collider node_collider
Manipulate DAG coordinatescoordinates coords2df coords2list
Covariate Adjustment SetsCovariate Adjustment Sets dag_adjustment_sets ggdag_adjustment_set
Create a dagitty DAGdag
Directed DAG edgesDAG Edges geom_dag_edges_arc geom_dag_edges_diagonal geom_dag_edges_fan geom_dag_edges_link
DAG labelsDAG Labels dag_label has_labels label label<- label<-.dagitty label<-.tidy_dagitty
Create a dagitty DAG using R-like syntaxdagify
Dplyr verb methods for 'tidy_dagitty' objectsanti_join.tidy_dagitty arrange.tidy_dagitty arrange_.tidy_dagitty distinct.tidy_dagitty dplyr filter.tidy_dagitty filter_.tidy_dagitty full_join.tidy_dagitty group_by.tidy_dagitty inner_join.tidy_dagitty left_join.tidy_dagitty mutate.tidy_dagitty mutate_.tidy_dagitty right_join.tidy_dagitty select.tidy_dagitty select_.tidy_dagitty semi_join.tidy_dagitty slice.tidy_dagitty slice_.tidy_dagitty summarise.tidy_dagitty summarise_.tidy_dagitty transmute.tidy_dagitty ungroup.tidy_dagitty
Generating Equivalent ModelsEquivalent DAGs and Classes ggdag_equivalent_class ggdag_equivalent_dags node_equivalent_class node_equivalent_dags
Find Exogenous VariablesExogenous Variables ggdag_exogenous node_exogenous
Quickly scale the size of a ggplotexpand_plot
Fortify a 'tidy_dagitty' object for 'ggplot2'fortify fortify.dagitty fortify.tidy_dagitty
Edges for paths activated by stratification on collidersgeom_dag_collider_edges
Directed and bidirected DAG edgesgeom_dag_edges
Node text labelsgeom_dag_label
Node textgeom_dag_text
Quickly plot a DAG in ggplot2ggdag
Quickly plot a DAG in ggplot2ggdag_classic
Create a new ggplotggplot.dagitty ggplot.tidy_dagitty
Repulsive textual annotationsgeom_dag_label_repel geom_dag_text_repel ggrepel functions
Find Instrumental Variablesggdag_instrumental Instrumental Variables node_instrumental
Assess if a variable confounds a relationshipis_confounder
Test for object class for tidy_dagittyis.tidy_dagitty
DAG Nodesgeom_dag_node geom_dag_point Nodes
Find Open Paths Between Variablesdag_paths ggdag_paths ggdag_paths_fan Pathways
Print a 'tidy_dagitty'print.tidy_dagitty
Pull components from DAG objectspull_dag pull_dag.dagitty pull_dag.tidy_dagitty pull_dag_data pull_dag_data.dagitty pull_dag_data.tidy_dagitty update_dag update_dag.tidy_dagitty update_dag<- update_dag<-.tidy_dagitty update_dag_data<- update_dag_data<-.tidy_dagitty
Quickly create a DAGs with common structures of biasbutterfly_bias collider_triangle confounder_triangle ggdag_butterfly_bias ggdag_collider_triangle ggdag_confounder_triangle ggdag_mediation_triangle ggdag_m_bias mediation_triangle m_bias Quick Plots for Common DAGs
Quickly remove plot axes and gridsremove_axes remove_grid
Common scale adjustments for DAGsscale_adjusted scale_dag
Simulate Data from Structural Equation Modelsimulate_data
Convert a 'tidy_dagitty' object to tbl_dftbl_df.tidy_daggity
Detecting colliders in DAGsis_collider is_downstream_collider Test if Variable Is Collider
Minimalist DAG themestheme_dag theme_dag_blank theme_dag_grid
Simple grey themes for DAGstheme_dag_gray theme_dag_gray_grid theme_dag_grey theme_dag_grey_grid
Tidy a 'dagitty' objecttidy_dagitty
Create a time-ordered coordinate data frametime_ordered_coords
Find variable statusggdag_status node_status Variable Status