Rev Language Reference


dnMultinomial - Multinomial Distribution

A multinomial distribution defines a probability distribution on a vector of natural numbers. It is understood as randomly picking n times from the k categories with replacement where each catefory has its own probability p[i].

Usage

dnMultinomial(Simplex p, Natural n)

Arguments

p : Simplex (pass by const reference)
The simplex of probabilities for the categories.
n : Natural (pass by const reference)
The number of draws.

Domain Type

Example

p <- simplex(1,1,1,1)
x ~ dnMultinomial(10, p)
y ~ dnDirichlet(x)
y.clamp( simplex(1,2,3,4) )
moves[1] = mvSlide(x, 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