| aux.effect {causaleffect} | R Documentation |
Identify a causal effect using surrogate experiments
Description
This function returns an expression for the joint distribution of the set of variables (y)
given the intervention on the set of variables (x) using auxiliary experiments on a set (z) if the effect is identifiable. Otherwise
an error is thrown describing the graphical structure that witnesses non-identifiability.
Usage
aux.effect(y, x, z, G, expr = TRUE, simp = TRUE,
steps = FALSE, primes = FALSE, stop_on_nonid = TRUE)
Arguments
y |
A character vector of variables of interest given the intervention. |
x |
A character vector of the variables that are acted upon. |
z |
A character vector describing the additional set available for manipulation. |
G |
An |
expr |
A logical value. If |
simp |
A logical value. If |
steps |
A logical value. If |
primes |
A logical value. If |
stop_on_nonid |
A logical value. If |
Value
If steps = FALSE, A character string or an object of class probability that describes the interventional distribution. Otherwise, a list as described in the arguments.
Author(s)
Santtu Tikka
References
Bareinboim E., Pearl J. 2012 Causal Inference by Surrogate Experiments: z-identifiability. Proceedings of the 28th Conference on Uncertainty in Artificial Intelligence, 113–120.
See Also
Examples
library(igraph)
# simplify = FALSE to allow multiple edges
f <- graph.formula(W -+ Z, Z -+ X, X -+ Y, W -+ Y, # Observed edges
W -+ Y, Y -+ W, Z -+ Y, Y -+ Z, Z -+ X, X -+ Z, simplify = FALSE)
# Here the bidirected edges are set to be unobserved in graph g
# This is denoted by giving them a description attribute with the value "U"
# The first 4 edges correspond to the observed edges, the rest are unobserved
f <- set.edge.attribute(f, "description", 5:10, "U")
aux.effect(y = "Y", x = "X", z = "Z", G = f)