% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rgem.R
\name{rgem}
\alias{rgem}
\title{Draw from the Griffiths-Engen-McCloskey distribution}
\usage{
rgem(alpha = 0, theta = 1, trunc_at = 500)
}
\arguments{
\item{alpha}{A parameter between zero and one}

\item{theta}{A parameter which must be greater than -alpha}

\item{trunc_at}{An integer which specifies the maximum number of components to return}
}
\value{
A vector of shares of length \code{trunc_at} which may sum to less than one
}
\description{
Draw from the Griffiths-Engen-McCloskey distribution
}
\details{
The Griffiths-Engen-McCloskey distribution is the infinite dimensional counterpart to the Ewens sampling distribution. This function does not return an infinite dimensional vector(!), but returns a vector of shares creating by a "stick-breaking" construction. The vector of shares is returned after \code{trunc_at} sticks are broken; this can mean that there is still a non-negligible residual amount.
}
