Rev Language Reference


dnBimodalNormal - Bernoulli Distribution

A Bernoulli-distributed random variable takes the value 1 with probability p and the value 0 with probability 1-p.

Usage

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

Arguments

mean1 : Real (pass by const reference)
Mean of the first normal distribution.
mean2 : Real (pass by const reference)
Mean of the second normal distribution.
sd1 : RealPos (pass by const reference)
Standard deviation of the first normal distributin.
sd2 : RealPos (pass by const reference)
Standard deviation of the second normal distribution.
p : Probability (pass by const reference)
Probability that the value belongs to the first normal distribution.

Domain Type

Example

p ~ dnBeta(1.0,1.0)
x ~ dnBimodalNormal(mean1=-1,mean2=1,sd1=0.1,sd2=0.1,p=p)
x.clamp( 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