Testing Graphical Causal Models Using the R Package "dagitty"
- PMID: 33592130
- DOI: 10.1002/cpz1.45
Testing Graphical Causal Models Using the R Package "dagitty"
Erratum in
-
Group Correction Statement (Data Availability Statements).Curr Protoc. 2022 Aug;2(8):e552. doi: 10.1002/cpz1.552. Curr Protoc. 2022. PMID: 36005902 Free PMC article. No abstract available.
-
Group Correction Statement (Conflict of Interest Statements).Curr Protoc. 2022 Aug;2(8):e551. doi: 10.1002/cpz1.551. Curr Protoc. 2022. PMID: 36005903 Free PMC article. No abstract available.
Abstract
Causal diagrams such as directed acyclic graphs (DAGs) are used in several scientific fields to help design and analyze studies that aim to infer causal effects from observational data; for example, DAGs can help identify suitable strategies to reduce confounding bias. However, DAGs can be difficult to design, and the validity of any DAG-derived strategy hinges on the validity of the postulated DAG itself. Researchers should therefore check whether the assumptions encoded in the DAG are consistent with the data before proceeding with the analysis. Here, we explain how the R package 'dagitty', based on the web tool dagitty.net, can be used to test the statistical implications of the assumptions encoded in a given DAG. We hope that this will help researchers discover model specification errors, avoid erroneous conclusions, and build better models. © 2021 The Authors. Basic Protocol 1: Constructing and importing DAG models from the dagitty web interface Support Protocol 1: Installing R, RStudio, and the dagitty package Basic Protocol 2: Testing DAGs against categorical data Basic Protocol 3: Testing DAGs against continuous data Support Protocol 2: Testing DAGs against continuous data with non-linearities Basic Protocol 4: Testing DAGs against a combination of categorical and continuous data.
Keywords: dagitty; directed acyclic graphs (DAGs); independence testing; model testing.
© 2021 The Authors.
Similar articles
-
Robust causal inference using directed acyclic graphs: the R package 'dagitty'.Int J Epidemiol. 2016 Dec 1;45(6):1887-1894. doi: 10.1093/ije/dyw341. Int J Epidemiol. 2016. PMID: 28089956
-
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.
-
Evidence synthesis for constructing directed acyclic graphs (ESC-DAGs): a novel and systematic method for building directed acyclic graphs.Int J Epidemiol. 2020 Feb 1;49(1):322-329. doi: 10.1093/ije/dyz150. Int J Epidemiol. 2020. PMID: 31325312 Free PMC article.
-
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.
-
Directed acyclic graphs: a tool for causal studies in paediatrics.Pediatr Res. 2018 Oct;84(4):487-493. doi: 10.1038/s41390-018-0071-3. Epub 2018 Jun 4. Pediatr Res. 2018. PMID: 29967527 Free PMC article. Review.
Cited by
-
The impact of market integration on arranged marriages in Matlab, Bangladesh.Evol Hum Sci. 2022 Dec 12;5:e5. doi: 10.1017/ehs.2022.54. eCollection 2023. Evol Hum Sci. 2022. PMID: 37587939 Free PMC article.
-
A model for understanding the causes and consequences of walking impairments.PLoS One. 2022 Dec 28;17(12):e0270731. doi: 10.1371/journal.pone.0270731. eCollection 2022. PLoS One. 2022. PMID: 36576918 Free PMC article.
-
Emotional and informational social support from health visitors and breastfeeding outcomes in the UK.Int Breastfeed J. 2023 Mar 7;18(1):14. doi: 10.1186/s13006-023-00551-7. Int Breastfeed J. 2023. PMID: 36882844 Free PMC article.
-
Toward practical causal epidemiology.Glob Epidemiol. 2021 Oct 21;3:100065. doi: 10.1016/j.gloepi.2021.100065. eCollection 2021 Nov. Glob Epidemiol. 2021. PMID: 37635727 Free PMC article.
-
Assessing the transportability of clinical prediction models for cognitive impairment using causal models.BMC Med Res Methodol. 2023 Aug 19;23(1):187. doi: 10.1186/s12874-023-02003-6. BMC Med Res Methodol. 2023. PMID: 37598141 Free PMC article.
References
Literature Cited
-
- Cleveland, W. S. (1979). Robust locally weighted regression and smoothing scatterplots. Journal of the American Statistical Association, 74(368), 829-836.
-
- Dua, D., & Graff, C. (2019). UCI machine learning repository. Available at http://archive.ics.uci.edu/ml.
-
- Ellis, B., Haaland, P., Hahne, F., Meur, N. Le, Gopalakrishnan, N., Spidlen, J., … Finak, G. (2019). flowCore: Basic structures for flow cytometry data, R package version 1.52.0.
-
- Grolemund, G., & Wickham, H. (2020). R for data science. Online e-book. Available at http://r4ds.had.co.nz/#.
-
- Heinze-Deml, C., Peters, J., & Meinshausen, N. (2018). Invariant causal prediction for nonlinear models. Journal of Causal Inference, 6(2), doi: 10.1515/jci-2017-0016.
MeSH terms
Grants and funding
LinkOut - more resources
Full Text Sources
Other Literature Sources
Molecular Biology Databases