Package: DAGassist 0.2.9

DAGassist: Test Robustness with Directed Acyclic Graphs

Provides robustness checks to align estimands with the identification that they require. Given a 'dagitty' object and a model specification, 'DAGassist' classifies variables by causal roles, recovers a target estimand, and generates a report comparing the original model with DAG-derived adjustment sets. Exports publication-grade reports in 'LaTeX', 'Word', 'Excel', 'dotwhisker', or plain text/'markdown'. 'DAGassist' is built on 'dagitty', an 'R' package that uses the 'DAGitty' web tool (<https://dagitty.net/>) for creating and analyzing DAGs. Methods draw on Pearl (2009) <doi:10.1017/CBO9780511803161> and Textor et al. (2016) <doi:10.1093/ije/dyw341>.

Authors:Graham Goff [aut, cre], Michael Denly [aut]

DAGassist_0.2.9.tar.gz
DAGassist_0.2.9.zip(r-4.7)DAGassist_0.2.9.zip(r-4.6)DAGassist_0.2.9.zip(r-4.5)
DAGassist_0.2.9.tgz(r-4.6-any)DAGassist_0.2.9.tgz(r-4.5-any)
DAGassist_0.2.9.tar.gz(r-4.7-any)DAGassist_0.2.9.tar.gz(r-4.6-any)
DAGassist_0.2.9.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
DAGassist/json (API)

# Install 'DAGassist' in R:
install.packages('DAGassist', repos = c('https://grahamgoff.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/grahamgoff/dagassist/issues

Pkgdown/docs site:https://grahamgoff.github.io

On CRAN:

Conda:

causal-inferencedagrobustness

5.58 score 2 stars 4 scripts 238 downloads 6 exports 52 dependencies

Last updated from:328607fb99. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK167
source / vignettesOK245
linux-release-x86_64OK148
macos-release-arm64OK109
macos-oldrel-arm64OK83
windows-develOK173
windows-releaseOK185
windows-oldrelOK95
wasm-releaseOK166

Exports:%>%add_edges_robustnessbad_controls_inclassify_nodesDAGassistpdag_robustness

Dependencies:backportsbayestestRbootbroomcheckmateclicpp11crayoncurldagittydata.tabledatawizarddotwhiskerdplyrfarverFormulagenericsggplot2gluegridExtragtableinsightisobandjsonlitelabelinglifecyclemagrittrmarginaleffectsMASSparameterspatchworkperformancepillarpkgconfigpurrrR6RColorBrewerRcpprlangS7scalesstringistringrtibbletidyrtidyselectutf8V8vctrsviridisLitewithrwritexl

Using DAGassist for Diagnosis and Re-estimation
Introduction | Step 0: Load DAGassist | Step 1: Declare an Estimand | Step 2: Draw a DAG | ----------------------- | Contract type (baseline; affects edu_year, income, children) | Scores: Permanent higher for higher class + urban; Informal higher for immigrant | Numeric index for linear effects (Informal=0, Temporary=1, Permanent=2) | Preference for children (baseline; affects children only) | Interpretable desired children: ~0 to 5, centered at ~2 | Centered version for linear predictors | helper: map degree to target years of schooling | ---- Try loop: redraw endogenous noise until calibration holds ---- | Job stability (time-varying; treatment-induced intermediate Z) | - affected by edu_true (treatment) and baseline contract | - affects mediators (income, married, birth_control) and outcome (children) | baseline level at t=0 | ---- Example usage ---- | Calibration check (what we target) | Attainment realism (adult-only) | Degree-type result (adult, completed degrees) | Step 3: Classify Control Variables by Role | 4. Estimate Models Using DAG-Consistent Adjustment Sets | 5. Recover the Interpretable Estimand | Export Publication-Grade Reports | Testing DGP Uncertainty with PDAGs | Testing Missing Arrows with add_edges() | References

Last update: 2026-06-28
Started: 2026-02-19

Supported Models
Notes | Example usage | estimatr::lm_robust | fixest::feglm | fixest::feols | lfe::felm | lme4::glmer | lmerTest::lmer | MASS::glm.nb | stats::lm

Last update: 2025-09-10
Started: 2025-09-09