Package: ggdag 0.2.13.9000
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:
ggdag_0.2.13.9000.tar.gz
ggdag_0.2.13.9000.zip(r-4.5)ggdag_0.2.13.9000.zip(r-4.4)ggdag_0.2.13.9000.zip(r-4.3)
ggdag_0.2.13.9000.tgz(r-4.4-any)ggdag_0.2.13.9000.tgz(r-4.3-any)
ggdag_0.2.13.9000.tar.gz(r-4.5-noble)ggdag_0.2.13.9000.tar.gz(r-4.4-noble)
ggdag_0.2.13.9000.tgz(r-4.4-emscripten)ggdag_0.2.13.9000.tgz(r-4.3-emscripten)
ggdag.pdf |ggdag.html✨
ggdag/json (API)
NEWS
# Install 'ggdag' in R: |
install.packages('ggdag', repos = c('https://r-causal.r-universe.dev', 'https://cloud.r-project.org')) |
Bug tracker:https://github.com/r-causal/ggdag/issues
causal-inferencedagggplot-extension
Last updated 4 months agofrom:46d7ca800a. Checks:OK: 7. Indexed: yes.
Target | Result | Date |
---|---|---|
Doc / Vignettes | OK | Nov 05 2024 |
R-4.5-win | OK | Nov 05 2024 |
R-4.5-linux | OK | Nov 05 2024 |
R-4.4-win | OK | Nov 05 2024 |
R-4.4-mac | OK | Nov 05 2024 |
R-4.3-win | OK | Nov 05 2024 |
R-4.3-mac | OK | Nov 05 2024 |
Exports:%>%activate_collider_pathsadjust_foraes_dagas_tidy_dagittybutterfly_biascollider_triangleconfounder_trianglecontrol_forcoords2dfcoords2listdagdag_adjustment_setsdag_labeldag_pathsdag_prunedag_saturatedagifyexpand_plotfiltergeom_daggeom_dag_collider_edgesgeom_dag_edgesgeom_dag_edges_arcgeom_dag_edges_diagonalgeom_dag_edges_fangeom_dag_edges_linkgeom_dag_labelgeom_dag_label_repelgeom_dag_label_repel2geom_dag_nodegeom_dag_pointgeom_dag_textgeom_dag_text_repelggdagggdag_adjacentggdag_adjustggdag_adjustment_setggdag_ancestorsggdag_butterfly_biasggdag_canonicalggdag_childrenggdag_classicggdag_colliderggdag_collider_triangleggdag_conditional_independenceggdag_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_dataquery_conditional_independenceremove_axesremove_gridscale_adjustedscale_dagsimulate_datatbl_df.tidy_daggitytest_conditional_independencetheme_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.Rmd
usingknitr::rmarkdown
on Nov 05 2024.Last update: 2024-03-05
Started: 2018-03-06
An Introduction to ggdag
Rendered fromintro-to-ggdag.Rmd
usingknitr::rmarkdown
on Nov 05 2024.Last update: 2024-03-05
Started: 2018-03-06
Common Structures of Bias
Rendered frombias-structures.Rmd
usingknitr::rmarkdown
on Nov 05 2024.Last update: 2024-03-05
Started: 2018-03-06
Readme and manuals
Help Manual
Help page | Topics |
---|---|
Activate paths opened by stratifying on a collider | activate_collider_paths |
Adjust for variables and activate any biasing paths that result | Adjust for variables adjust_for control_for ggdag_adjust |
Define Aesthetics for Directed Acyclic Graphs (DAGs) | aes_dag |
Convert DAGS to tidygraph | as_tbl_graph as_tbl_graph.dagitty as_tbl_graph.tidy_dagitty |
Convert objects into 'tidy_dagitty' objects | as_tidy_dagitty as_tidy_dagitty.dagitty as_tidy_dagitty.data.frame as_tidy_dagitty.list |
Convert a 'tidy_dagitty' object to data.frame | as.data.frame.tidy_dagitty |
Convert a 'tidy_dagitty' object to tbl | as.tbl.tidy_daggity as_tibble.tidy_daggity |
D-relationship between variables | Assess d-separation between variables ggdag_dconnected ggdag_drelationship ggdag_dseparated node_dconnected node_drelationship node_dseparated |
Familial relationships between variables | Assess 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 DAG | Canonicalize DAGs ggdag_canonical node_canonical |
Find colliders | Colliders ggdag_collider node_collider |
Manipulate DAG coordinates | coordinates coords2df coords2list |
Covariate Adjustment Sets | Covariate Adjustment Sets dag_adjustment_sets ggdag_adjustment_set |
Create a dagitty DAG | dag |
Directed DAG edges | DAG Edges geom_dag_edges_arc geom_dag_edges_diagonal geom_dag_edges_fan geom_dag_edges_link |
DAG labels | DAG Labels dag_label has_labels label label<- label<-.dagitty label<-.tidy_dagitty |
Saturate or prune an existing DAG | dag_prune dag_saturate |
Create a dagitty DAG using R-like syntax | dagify |
Dplyr verb methods for 'tidy_dagitty' objects | anti_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 Models | Equivalent DAGs and Classes ggdag_equivalent_class ggdag_equivalent_dags node_equivalent_class node_equivalent_dags |
Find Exogenous Variables | Exogenous Variables ggdag_exogenous node_exogenous |
Quickly scale the size of a ggplot | expand_plot |
Fortify a 'tidy_dagitty' object for 'ggplot2' | fortify fortify.dagitty fortify.tidy_dagitty |
Add common DAG layers to a ggplot | geom_dag |
Edges for paths activated by stratification on colliders | geom_dag_collider_edges |
Directed and bidirected DAG edges | geom_dag_edges |
Node text labels | geom_dag_label |
Node text | geom_dag_text |
Quickly plot a DAG in ggplot2 | ggdag |
Quickly plot a DAG in ggplot2 | ggdag_classic |
Create a new ggplot | ggplot.dagitty ggplot.tidy_dagitty |
Repulsive textual annotations | geom_dag_label_repel geom_dag_label_repel2 geom_dag_text_repel ggrepel functions |
Find Instrumental Variables | ggdag_instrumental Instrumental Variables node_instrumental |
Assess if a variable confounds a relationship | is_confounder |
Test for object class for tidy_dagitty | is.tidy_dagitty |
DAG Nodes | geom_dag_node geom_dag_point Nodes |
Find Open Paths Between Variables | dag_paths ggdag_paths ggdag_paths_fan Pathways |
Print a 'tidy_dagitty' | print.tidy_dagitty |
Pull components from DAG objects | pull_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 |
Query and Test Conditional Independence in a DAG | ggdag_conditional_independence query_conditional_independence test_conditional_independence |
Quickly create a DAGs with common structures of bias | butterfly_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 grids | remove_axes remove_grid |
Common scale adjustments for DAGs | scale_adjusted scale_dag |
Simulate Data from Structural Equation Model | simulate_data |
Convert a 'tidy_dagitty' object to tbl_df | tbl_df.tidy_daggity |
Detecting colliders in DAGs | is_collider is_downstream_collider Test if Variable Is Collider |
Minimalist DAG themes | theme_dag theme_dag_blank theme_dag_grid |
Simple grey themes for DAGs | theme_dag_gray theme_dag_gray_grid theme_dag_grey theme_dag_grey_grid |
Tidy a 'dagitty' object | tidy_dagitty |
Create a time-ordered coordinate data frame | time_ordered_coords |
Find variable status | ggdag_status node_status Variable Status |