1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
\name{rdirichlet}
\alias{rdirichlet}
\title{Random draws from a Dirichlet distribution}
\description{
Simulates a sample from a Dirichlet distribution
}
\usage{
rdirichlet(n,par)
}
\arguments{
\item{n}{number of simulations required}
\item{par}{vector of parameters of the Dirichlet distribution}
}
\value{
matrix of simulated draws where each row corresponds to a single draw
}
\author{Jim Albert}
\examples{
par=c(2,5,4,10)
n=10
rdirichlet(n,par)
}
\keyword{models}
|