Rev Language Reference


dnBimodalLognormal - Bimodal Lognormal Distribution

The Bimodal Lognormal distribution unites two separate lognormal distributions.

Usage

dnBimodalLognormal(Real mean1, Real mean2, RealPos sd1, RealPos sd2, Probability p)

Arguments

mean1 : Real (pass by const reference)
The mean (in log-space) of the first lognormal distribution.
mean2 : Real (pass by const reference)
The mean (in log-space) of the second lognormal distribution.
sd1 : RealPos (pass by const reference)
The standard deviation (in log-space) of the first lognormal distribution.
sd2 : RealPos (pass by const reference)
The standard deviation (in log-space) of the second lognormal distribution.
p : Probability (pass by const reference)
The probability to belong to the first distribution.

Domain Type

Details

The bimodal lognormal distribution takes five parameters: mean1 and mean2 (the means (in log-space) of the two lognormal distributions), sd1 and sd2 (the standard deviations (in log-space) of the two lognormal distributions), and p (between 0 and 1). The value will be distributed according to the first lognormal distribution with probability p, and distributed according to the second lognormal distribution with probability (1 - p).

Example

p ~ dnBeta(1.0,1.0)
x ~ dnBimodalLognormal(mean1=-1,mean2=1,sd1=0.1,sd2=0.1,p=p)
x.clamp( exp(1) )
moves[1] = mvSlide(p, delta=0.1, weight=1.0)
monitors[1] = screenmonitor(printgen=1000, separator = "        ", x)
mymodel = model(p)
mymcmc = mcmc(mymodel, monitors, moves)
mymcmc.burnin(generations=20000,tuningInterval=100)
mymcmc.run(generations=200000)

See Also