% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/discrete.gamma.R
\name{discrete.gamma}
\alias{discrete.gamma}
\alias{discrete.beta}
\alias{plot_gamma_plus_inv}
\alias{plotRates}
\title{Discrete Gamma and Beta distribution}
\usage{
discrete.gamma(alpha, k)

discrete.beta(shape1, shape2, k)

plot_gamma_plus_inv(shape = 1, inv = 0, k = 4, discrete = TRUE,
  cdf = TRUE, append = FALSE, xlab = "x", ylab = ifelse(cdf, "F(x)",
  "f(x)"), xlim = NULL, verticals = FALSE, edge.length = NULL,
  site.rate = "gamma", ...)

plotRates(obj, cdf.color = "blue", main = "cdf", ...)
}
\arguments{
\item{alpha}{Shape parameter of the gamma distribution.}

\item{k}{Number of intervals of the discrete gamma distribution.}

\item{shape1, shape2}{non-negative parameters of the Beta distribution.}

\item{shape}{Shape parameter of the gamma distribution.}

\item{inv}{Proportion of invariable sites.}

\item{discrete}{logical whether to plot discrete (default) or continuous pdf
or cdf.}

\item{cdf}{logical whether to plot the cumulative distribution function
or density / probability function.}

\item{append}{logical; if TRUE only add to an existing plot.}

\item{xlab}{a label for the x axis, defaults to a description of x.}

\item{ylab}{a label for the y axis, defaults to a description of y.}

\item{xlim}{the x limits of the plot.}

\item{verticals}{logical; if TRUE, draw vertical lines at steps.}

\item{edge.length}{Total edge length (sum of all edges in a tree).}

\item{site.rate}{Indicates what type of gamma distribution to use. Options
are "gamma" (Yang 1994) and "gamma_quadrature" using Laguerre quadrature
approach of Felsenstein (2001)}

\item{\dots}{Further arguments passed to or from other methods.}

\item{obj}{an object of class pml}

\item{cdf.color}{color of the cdf.}

\item{main}{a main title for the plot.}
}
\value{
\code{discrete.gamma} returns a matrix.
}
\description{
\code{discrete.gamma} internally used for the likelihood computations in
\code{pml} or \code{optim.pml}. It is useful to understand how it works
for simulation studies or in cases where .
}
\details{
These functions are exported to be used in different packages so far only in
the package coalescentMCMC, but are not intended for end user. Most of the
functions call C code and are far less forgiving if the import is not what
they expect than \code{pml}.
}
\examples{
discrete.gamma(1, 4)

old.par <- par(no.readonly = TRUE)
par(mfrow = c(2,1))
plot_gamma_plus_inv(shape=2, discrete = FALSE, cdf=FALSE)
plot_gamma_plus_inv(shape=2, append = TRUE, cdf=FALSE)

plot_gamma_plus_inv(shape=2, discrete = FALSE)
plot_gamma_plus_inv(shape=2, append = TRUE)
par(old.par)

}
\seealso{
\code{\link{pml.fit}, \link{stepfun}, link{pgamma}, link{pbeta}},
}
\author{
Klaus Schliep \email{klaus.schliep@gmail.com}
}
\keyword{cluster}
