% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dnbinom_new.R
\name{dnbinom_new}
\alias{dnbinom_new}
\title{Density for the negative binomial distribution - Alternative parametrization.}
\usage{
dnbinom_new(
  x,
  size = NULL,
  prob = NULL,
  mu = NULL,
  sd = NULL,
  var = NULL,
  log = FALSE
)
}
\arguments{
\item{x}{vector of (non-negative integer) quantiles.}

\item{size}{target for number of successful trials, or dispersion parameter (the shape parameter of the gamma mixing distribution). Must be strictly positive, need not be integer.}

\item{prob}{probability of success in each trial. 0 < prob <= 1.}

\item{mu}{alternative parametrization via mean.}

\item{sd}{alternative parametrization via standard deviation.}

\item{var}{alternative parametrization via variance.}

\item{log}{logical; if TRUE, probabilities p are given as log(p).}
}
\value{
Density for the negative binomial distribution - Alternative parametrization.
}
\description{
Density for the negative binomial distribution with parameters mu, sd, var, size or prob. See \code{dnbinom}.
}
\details{
dnbinom_new returns density for the negative binomial distribution
}
\examples{
\dontrun{
library("HelpersMG")
set.seed(1)
x <- rnbinom_new(n=100, mu=2, sd=3)
LnL <- NULL
df <- data.frame(mu=seq(from=0.1, to=8, by=0.1), "-LnL"=NA)
for (mu in df[, "mu"])
LnL <- c(LnL, -sum(dnbinom_new(x=x, mu=mu, sd=3, log=TRUE)))
df[, "-LnL"] <- LnL
ggplot(data = df, aes(x = .data[["mu"]], y = .data[["-LnL"]])) + geom_line()
# Examples of wrong parametrization
dnbinom_new(x=x, mu=c(1, 2), sd=3, log=TRUE)
}
}
\seealso{
Other Distributions:
\code{\link[=cutter]{cutter()}},
\code{\link[=dSnbinom]{dSnbinom()}},
\code{\link[=dbeta_new]{dbeta_new()}},
\code{\link[=dcutter]{dcutter()}},
\code{\link[=dggamma]{dggamma()}},
\code{\link[=logLik.cutter]{logLik.cutter()}},
\code{\link[=plot.cutter]{plot.cutter()}},
\code{\link[=print.cutter]{print.cutter()}},
\code{\link[=r2norm]{r2norm()}},
\code{\link[=rcutter]{rcutter()}},
\code{\link[=rmnorm]{rmnorm()}},
\code{\link[=rnbinom_new]{rnbinom_new()}}
}
\author{
Marc Girondot \email{marc.girondot@gmail.com}
}
\concept{Distributions}
