ggdag (development version)
- Introduced new
query_*()
API for direct analytical queries on DAGs (#185). These functions return tibbles with results rather than tidy DAG objects for plotting:-
query_adjustment_sets()
: Find adjustment sets to close backdoor paths -
query_paths()
: Find and analyze paths between nodes -
query_instrumental()
: Identify instrumental variables -
query_dseparated()
/query_dconnected()
: Test d-separation relationships -
query_colliders()
: Identify collider nodes -
query_exogenous()
: Find exogenous variables -
query_parents()
,query_children()
,query_ancestors()
,query_descendants()
: Query node relationships -
query_markov_blanket()
: Find Markov blankets
-
- All error messages, warnings, and informational messages now use the cli package for better formatting and user experience. This change adds custom error classes (
ggdag_error
,ggdag_warning
) that enable programmatic error handling (#191). - Fixed
tidy_dagitty()
error when processing DAGs with no edges (#159) - Fixed
dag_paths()
error when no open paths exist between nodes (#180) - Introduced new functions
query_conditional_independence()
,test_conditional_independence()
, andggdag_conditional_independence()
for detecting, testing, and visualizing implied conditional independencies in a given DAG and dataset (#139) - Added
sort
parameter toggdag_conditional_independence()
with defaultTRUE
to sort conditional independence tests by their estimates for improved readability (#170) - Introduced new functions
aes_dag()
andgeom_dag()
to simplify specification of ggplot code for most DAGs. Also refactored most quick plots to use these functions (#121) - Added new function
geom_label_repel2()
for more opinionated repelled labels that often look better on DAGs (#132) - Improved DAG data structure by removing unnecessary
circular
column when not needed. The column is now only included when using circular layouts. This simplifies the tidy DAG structure for most use cases (#119) - Edge geoms now support mapping
color
/colour
aesthetics toedge_color
/edge_colour
for more intuitive usage, matching ggplot2 conventions (#166) - Fixed
theme_dag()
facet labels being clipped by adding margin to strip text (#173) - Added quick plot functions for the causal quartet:
quartet_collider()
,quartet_confounder()
,quartet_mediator()
,quartet_m_bias()
, andquartet_time_collider()
, along with theirggdag_*
counterparts. These functions create DAGs representing the causal quartet from D’Agostino McGowan, Gerke, and Barrett (2023), demonstrating that statistical properties alone cannot determine causal relationships (#171)
ggdag 0.2.11
CRAN release: 2024-01-24
- Internal update to address upcoming changes in ggplot2 (#125, thanks @teunbrand)
- Implemented automatic time-ordered coordinates for
time_ordered_coords()
andlayout
(#115) - Added
geom_dag_label()
to complementgeom_dag_text()
and the repel functions (#116) - Added
pull_dag()
andpull_dag_data()
to extract DAG components,update_dag()
andupdate_dag_data()
to update DAG components, andas_tidy_dagitty()
to construct DAGs from data frames (#117). Thanks to @lorenzoFabbri for inspiring some of the data-to-dag code in #90.
ggdag 0.2.10
CRAN release: 2023-05-28
- Fixed bug where ggdag was using wrong
left_join()
interface with dplyr 1.1.0 (#110)
ggdag 0.2.8
CRAN release: 2023-03-17
- Added new function
time_ordered_coords()
for calculating time-ordered coordinates (#88) - Addressed changes requested by CRAN, other changes in tidyverse (#87, #86, #85)
ggdag 0.2.7
CRAN release: 2022-10-29
- Fixed various bugs in calculating and visualizing paths (#75)
- Fixed breaking changes from the upcoming release of ggplot2 3.4.0 (#79)
-
size
is now deprecated forgeom_dag_collider_edges()
in favor oflinewidth
, related to #79.
ggdag 0.2.5
CRAN release: 2022-07-16
- Fixed issue with
dag_adjustment_sets()
whenwidth
option was low by extracting adjustment sets directly (#70) - Fixed issue with
tidy_dagitty()
that missed nodes with no edges attached. May cause minor breaking changes in randomized layouts. (#68) - Added the
limit
argument todag_paths
,ggdag_paths
, andggdag_paths_fan
(seedagitty::paths
) (#65).
ggdag 0.2.4
CRAN release: 2021-10-10
-
tidy_dagitty()
no longer allows the dendogram layout type (#62) -
scale_adjusted()
now correctly aligns legend types (#61) - ggdag no longer loads ggplot2 via
Depends
, instead importing it internally (#57).
ggdag 0.2.3
CRAN release: 2021-01-12
- Update vdiffr to be explicitly conditional (#51)
- Fixed bug in
activate_collider_paths()
that causes an error where a collider had a high number of ancestors (#49) - Fixed bug in
node_equivalent_dags()
where extra columns did not get joined to new tidy DAG (#40)
ggdag 0.2.2
CRAN release: 2020-02-13
- Added vdiffr tests, as well as a basic test file for every
.R
file. (#27) - Updated roxygen2 version (#29)
- Fixed bugs in
dag_paths()
andgeom_dag_edges_fan()
(#31) - Removed use of
use_defaults()
ggproto
method inGeomDAGEdge
(#33) - Use
ggplot2::expansion()
instead ofexpand_scale()
when ggplot2 version is at least3.3.0
and removed local version ofexpand_scale()
(#34)
ggdag 0.2.1
CRAN release: 2019-12-06
- Fixed bug in
ggdag_collider()
where the aesthetics were flipped for the colors but not the labels (issue #15, b72e34b) - Used
as.character.default()
directly for working with characters to avoid dispatch error when the formula.tools package is attached (issue #17, 0f32bb4)
ggdag 0.2.0
CRAN release: 2019-09-12
- Fixed compatibility issue with ggraph 2.0.0 by changing to
strength
parameter in curved geoms - 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 checkto
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.