Rev Language Reference


tnExp - Exp-transformed distribution

Exp-transforms a given distribution.

Usage

tnExp(Distribution__Real baseDistribution)

Arguments

baseDistribution : Distribution__Real (pass by const reference)
The distribution to be transformed.

Domain Type

Details

If X ~ dist then tnExp(dist) is the distribution of exp(X). The distribution `dist` can be either univariate (dnNormal) or multivariate (dnMultivariateNormal). This turns out to be the same as dnLog(dist), which provides a distribution that has distribution `dist` on the log-scale.

Example

x ~ tnExp(dnNormal(0,1))          # Draw from the log-Normal distribution
x ~ dnNormal(0,1) |> tnExp()      # Expressed using pipes.
x ~ dnLognormal(0,1)              # This is equivalent.
y ~ dnNormal(0,1)
x := exp(y)                       # This is also equivalent.

x ~ tnExp(dnGamma(2,3))           # There is no equivalent for this.
x ~ dnIID(10,tnExp(dnGamma(2,3))) # Draw 10 log-Gamma(2,3) random variables.

mu = [1.0, 2.0, 3.0, 4.0]
Sigma ~ dnWishart(df=4, kappa=2, dim=4)
x ~ dnMultivariateNormal(mu,Sigma) |> tnExp()

See Also