Description Usage Arguments Value Author(s) References See Also Examples

View source: R/causal.effect.R

This function returns an expression for the joint distribution of the set of variables (`y`

)
given the intervention on the set of variables (`x`

) conditional on (`z`

) if the effect is identifiable. Otherwise
an error is thrown describing the graphical structure that witnesses non-identifiability. If `steps = TRUE`

, returns instead
a list where the first element is the expression and the second element is a list of the intermediary steps taken by the algorithm.

1 2 |

`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 of the conditioning variables. |

`G` |
An |

`expr` |
A logical value. If |

`simp` |
A logical value. If |

`steps` |
A logical value. If |

`primes` |
A logical value. If |

`prune` |
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 interventional distribution. Otherwise, a list as described in the arguments.

Santtu Tikka

Shpitser I., Pearl J. 2006 Identification of Joint Interventional Distributions in Recursive semi-Markovian Causal Models.
*Proceedings of the 21st National Conference on Artificial Intelligence*, **2**, 1219–1226.

Shpitser I., Pearl J. 2006 Identification of Conditional Interventional Distributions.
*Proceedings of the 22nd Conference on Uncertainty in Artificial Intelligence*, 427–444.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ```
library(igraph)
# simplify = FALSE to allow multiple edges
g <- graph.formula(x -+ y, z -+ x, z -+ y , x -+ z, z -+ x, simplify = FALSE)
# Here the bidirected edge between X and Z is set to be unobserved in graph g
# This is denoted by giving them a description attribute with the value "U"
# The edges in question are the fourth and the fifth edge
g <- set.edge.attribute(graph = g, name = "description", index = c(4,5), value = "U")
causal.effect("y", "x", G = g)
# Pruning example
p <- graph.formula(x -+ z_4, z_4 -+ y, z_1 -+ x, z_2 -+ z_1,
z_3 -+ z_2, z_3 -+ x, z_5 -+ z_1, z_5 -+ z_4, x -+ z_2, z_2 -+ x,
z_3 -+ z_2, z_2 -+ z_3, z_2 -+ y, y -+ z_2,
z_4 -+ y, y -+ z_4, z_5 -+ z_4, z_4 -+ z_5, simplify = FALSE)
p <- set.edge.attribute(p, "description", 9:18, "U")
causal.effect("y", "x", G = p, primes = TRUE, prune = TRUE)
# Simplification example
s <- graph.formula(x -+ y, w -+ x, w -+ z, z -+ y)
causal.effect("y", "x", G = s, simp = FALSE)
causal.effect("y", "x", G = s, simp = TRUE)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.