Estimate the identified effect from data
Usage
morie_dag_estimate(
dag,
data,
method = c("backdoor.aipw", "backdoor.linear", "backdoor.dml")
)Examples
set.seed(1)
z <- rnorm(400); x <- rbinom(400, 1, plogis(z))
y <- 0.8 * x + z + rnorm(400)
df <- data.frame(z = z, x = x, y = y)
g <- morie_dag(c("z -> x", "z -> y", "x -> y"), "x", "y")
morie_dag_estimate(g, df, method = "backdoor.linear")
#> $ate
#> [1] 0.8599143
#>
#> $se
#> [1] 0.1218017
#>
#> $ci_lower
#> [1] 0.6211829
#>
#> $ci_upper
#> [1] 1.098646
#>
#> $n
#> [1] 400
#>
#> $estimand
#> [1] "backdoor"
#>
#> $adjustment_set
#> [1] "z"
#>
#> $method
#> [1] "backdoor.linear (rmorie native)"
#>
