Skip to contents

Build a causal DAG

Usage

morie_dag(edges, exposure, outcome, latent = character())

Arguments

edges

Character vector of edges, each "A -> B".

exposure

Name of the exposure/treatment node.

outcome

Name of the outcome node.

latent

Character vector of unobserved nodes (excluded from any adjustment set).

Value

An object of class morie_dag: list with nodes, edges (2-column matrix from/to), exposure, outcome, latent.

Examples

g <- morie_dag(c("race -> placement", "race -> outcome",
                 "placement -> outcome"),
               exposure = "placement", outcome = "outcome")
morie_dag_identify(g)
#> $identified
#> [1] TRUE
#> 
#> $estimand
#> [1] "backdoor"
#> 
#> $adjustment_set
#> [1] "race"
#>