Robust causal inference using directed acyclic graphs: the R package 'dagitty'
- PMID: 28089956
- DOI: 10.1093/ije/dyw341
Robust causal inference using directed acyclic graphs: the R package 'dagitty'
Abstract
Directed acyclic graphs (DAGs), which offer systematic representations of causal relationships, have become an established framework for the analysis of causal inference in epidemiology, often being used to determine covariate adjustment sets for minimizing confounding bias. DAGitty is a popular web application for drawing and analysing DAGs. Here we introduce the R package 'dagitty', which provides access to all of the capabilities of the DAGitty web application within the R platform for statistical computing, and also offers several new functions. We describe how the R package 'dagitty' can be used to: evaluate whether a DAG is consistent with the dataset it is intended to represent; enumerate 'statistically equivalent' but causally different DAGs; and identify exposure-outcome adjustment sets that are valid for causally different but statistically equivalent DAGs. This functionality enables epidemiologists to detect causal misspecifications in DAGs and make robust inferences that remain valid for a range of different DAGs. The R package 'dagitty' is available through the comprehensive R archive network (CRAN) at [https://cran.r-project.org/web/packages/dagitty/]. The source code is available on github at [https://github.com/jtextor/dagitty]. The web application 'DAGitty' is free software, licensed under the GNU general public licence (GPL) version 2 and is available at [http://dagitty.net/].
© The Author 2017; all rights reserved. Published by Oxford University Press on behalf of the International Epidemiological Association.
Similar articles
-
Testing Graphical Causal Models Using the R Package "dagitty".Curr Protoc. 2021 Feb;1(2):e45. doi: 10.1002/cpz1.45. Curr Protoc. 2021. PMID: 33592130
-
Software Application Profile: The daggle app-a tool to support learning and teaching the graphical rules of selecting adjustment variables using directed acyclic graphs.Int J Epidemiol. 2023 Oct 5;52(5):1659-1664. doi: 10.1093/ije/dyad038. Int J Epidemiol. 2023. PMID: 36952629 Free PMC article.
-
Use of directed acyclic graphs (DAGs) to identify confounders in applied health research: review and recommendations.Int J Epidemiol. 2021 May 17;50(2):620-632. doi: 10.1093/ije/dyaa213. Int J Epidemiol. 2021. PMID: 33330936 Free PMC article. Review.
-
[Directed acyclic graphs (DAGs) - the application of causal diagrams in epidemiology].Gesundheitswesen. 2011 Dec;73(12):888-92. doi: 10.1055/s-0031-1291192. Epub 2011 Dec 22. Gesundheitswesen. 2011. PMID: 22193898 German.
-
Graphical presentation of confounding in directed acyclic graphs.Nephrol Dial Transplant. 2015 Sep;30(9):1418-23. doi: 10.1093/ndt/gfu325. Epub 2014 Oct 16. Nephrol Dial Transplant. 2015. PMID: 25324358 Review.
Cited by
-
The consumption of ultra-processed foods was associated with adiposity, but not with metabolic indicators in a prospective cohort study of Chilean preschool children.BMC Med. 2024 Aug 26;22(1):340. doi: 10.1186/s12916-024-03556-z. BMC Med. 2024. PMID: 39183281 Free PMC article.
-
Association of serum calcium, vitamin D, and C-reactive protein with all-cause and cause-specific mortality in an osteoarthritis population in the UK: a prospective cohort study.BMC Public Health. 2024 Aug 22;24(1):2286. doi: 10.1186/s12889-024-19825-8. BMC Public Health. 2024. PMID: 39175018 Free PMC article.
-
No differences in clinical and radiographic outcomes between standard offset and high offset short cementless stems.Arch Orthop Trauma Surg. 2024 Aug 21. doi: 10.1007/s00402-024-05431-1. Online ahead of print. Arch Orthop Trauma Surg. 2024. PMID: 39168958
-
Adverse childhood experiences, marital status and depressive symptoms in later life among the Chinese middle-aged and older adults : the mediating role of marital status.BMC Public Health. 2024 Aug 19;24(1):2246. doi: 10.1186/s12889-024-19787-x. BMC Public Health. 2024. PMID: 39160540 Free PMC article.
-
eVisits to primary care and subsequent health care contacts: a register-based study.BMC Prim Care. 2024 Aug 12;25(1):297. doi: 10.1186/s12875-024-02541-y. BMC Prim Care. 2024. PMID: 39135150 Free PMC article.
MeSH terms
LinkOut - more resources
Full Text Sources
Other Literature Sources