View source: R/surrogate.outcome.R
surrogate.outcome | R Documentation |
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)
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 |
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.
generalize
, causal.effect
, get.expression
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.