get.expression {causaleffect} R Documentation

## Get the expression of a probability object

### Description

This function converts an object of class probability returned by aux.effect, causal.effect, generalize, meta.transport, recover or transport with expr = FALSE into a string which represents the probability distribution. Currently only LaTeX syntax is available.

### Usage

get.expression(x, primes = FALSE)

### Arguments

 x An object of class probability which is an internal list structure describing the interventional distribution. primes A logical value. If TRUE, prime symbols are appended to summation variables to make them distinct from their other instantiations.

### Value

A character string that describes the resulting distribution in LaTeX syntax.

### Author(s)

Santtu Tikka

aux.effect, causal.effect, generalize, meta.transport, recover, transport

### Examples

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

x <- causal.effect(y = "Y", x = "X", z = NULL, G = g, expr = FALSE)
get.expression(x, primes = FALSE)
get.expression(x, primes = TRUE)


[Package causaleffect version 1.3.15 Index]