tests/testthat/helper-load_dag.R

set.seed(1234)

test_dag <- dagify(
  y ~ x + z2 + w2 + w1,
  x ~ z1 + w1,
  z1 ~ w1 + v,
  z2 ~ w2 + v,
  w1 ~ ~w2,
  exposure = "x",
  outcome = "y"
)

test_dag <- tidy_dagitty(test_dag)
malcolmbarrett/ggdag documentation built on March 8, 2024, 5:49 p.m.