% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/PCzinb_internal.R
\name{nb.OptimizeDispersion}
\alias{nb.OptimizeDispersion}
\title{(NB) model. The NB distribution is parametrized by two
parameters: the mean value and the dispersion of the negative binomial
distribution}
\usage{
nb.OptimizeDispersion(mu, Y, n)
}
\arguments{
\item{mu}{the vector mean  of the negative binomial}

\item{Y}{the vector of counts}

\item{n}{the length of the vector to return
Note that theta is sometimes called inverse dispersion parameter (and
phi=1/theta is then called the dispersion parameter). We follow the
convention that the variance of the NB variable with mean mu and dispersion
theta is mu + mu^2/theta.}
}
\value{
A vector of length n with the optimized dispersion parameter values.
}
\description{
(NB) model. The NB distribution is parametrized by two
parameters: the mean value and the dispersion of the negative binomial
distribution
}
\keyword{internal}
