surrogate.outcome {causaleffect}R Documentation

Derive a formula for a causal effect using surrogate outcomes


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.


surrogate.outcome(y, x, S, G, expr = TRUE, 
  steps = FALSE, primes = FALSE, stop_on_nonid = TRUE)



A character vector of variables of interest given the intervention.


A character vector of the variables that are acted upon.


A list describing the available experimental data.


An igraph object describing the directed acyclic graph induced by the causal model that matches the internal syntax.


A logical value. If TRUE, a string is returned describing the expression in LaTeX syntax. Else, a list structure is returned which can be manually parsed by the function get.expression


A logical value. If TRUE, returns a list where the first element corresponds to the expression of the transport formula and the second to the a list describing intermediary steps taken by the algorithm.


A logical value. If TRUE, prime symbols are appended to summation variables to make them distinct from their other instantiations.


A logical value. If TRUE, an error is produced when a non-identifiable effect is discovered. Otherwise recursion continues normally.


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.


Santtu Tikka


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



# 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)

[Package causaleffect version 1.3.15 Index]