surrogate.outcome {causaleffect} | R Documentation |
Derive a formula for a causal effect using surrogate outcomes
Description
This function returns an expression for the causal effect of interest using surrogate outcomes. The formula is returned for the interventional distribution of the set of variables (y
) given the intervention on the set of variables (x
). Available experimental data are depicted by a list (S
) where each element is a list with two elements, Z
and W
, that are character vectors describing the experiments and the outcome variables, respectively.
Usage
surrogate.outcome(y, x, S, G, expr = 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. |
S |
A list describing the available experimental data. |
G |
An |
expr |
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 causal effect. Otherwise, a list as described in the arguments.
Author(s)
Santtu Tikka
References
Bareinboim E., Pearl J. 2014 Transportability from Multiple Environments with Limited Experiments: Completeness Results. Proceedings of the 27th Annual Conference on Neural Information Processing Systems, 280–288.
See Also
generalize
, causal.effect
, get.expression
Examples
library(igraph)
# We set simplify = FALSE to allow multiple edges.
g <- graph.formula(W -+ X, W -+ Z, X -+ Z, Z -+ Y, # Observed edges
X -+ Z, Z -+ X, simplify = FALSE)
# We set the bidirected edges
g <- set.edge.attribute(g, "description", 5:6, "U")
# We construct the set of available experimental data
s <- list(
list(Z = c("X"), W = c("Z"))
)
surrogate.outcome(y = "Y", x = "X", S = s, G = g)