Learn R Programming

causaleffect (version 1.3.15)

surrogate.outcome: 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)

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.

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 igraph object describing the directed acyclic graph induced by the causal model that matches the internal syntax.

expr

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

steps

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.

primes

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

stop_on_nonid

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

Author

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

Run this code
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)

Run the code above in your browser using DataLab