Takes an expression e and a list vars and returns a lazy edist (expression distribution object), that is a subclass of dist that can be used in place of a dist object.

edist(e, vars)

Arguments

e

the expression to evaluate against the arguments.

vars

the list of distributions (with variable names) to evaluate the expression e against.

Value

An edist object.

Examples

x <- normal(0, 1)
y <- normal(2, 3)
e <- edist(quote(x + y), list(x = x, y = y))
e
#> Expression distribution: x + y 
#>    x  ~  Normal distribution (mu = 0, var = 1) 
#>    y  ~  Normal distribution (mu = 2, var = 3)