Gesundheitswesen 2010; 72 - P214
DOI: 10.1055/s-0030-1266721

Functionalities of the dagR package for directed acyclic graphs

L Breitling 1
  • 1C070 Deutsches Krebsforschungszentrum, Heidelberg

Background: Directed acyclic graphs (DAGs) have in recent years been introduced to the field of epidemiology. They present a valuable framework for understanding causality and confounding, but their use still remains limited. Here, I present the add-on package dagR, a set of basic DAG-related functions for the statistical software R. Materials. Examples of DAGs created, evaluated, and drawn using dagR are presented. dagR follows the graphical algorithms described in the DAG literature in order to find biasing paths or associations introduced by adjustment. Convenient functions can be used to identify minimal sufficient adjustment sets. These and other functionalities are shown by examples, alongside a list of limitations and open issues remaining. Conclusions: dagR, which has recently been published on cran.r-project.org, hopefully will help to promote DAGs as a useful tool for epidemiologists. The present version may only serve as a starting point, and further contributions from DAG scientists and R programmers are eagerly awaited.