data("ex1")
result <- estimateEffect(ex1$data, c(5,3), 7, ex1$amat.cpdag, bootstrap=TRUE)
print(result$effect)
print(result$effect - 1.96 * sqrt(diag(result$se.cov)))
print(result$effect + 1.96 * sqrt(diag(result$se.cov)))
# compare with truth
print(ex1$true.effects)
if (FALSE) {
# throws an error because the effect is not identified
estimateEffect(ex1$data, 3, 7, ex1$amat.cpdag)
}
Run the code above in your browser using DataLab