fitdistrNB: Maximum likelihood of negative binomial distribution

Description Usage Arguments Details Value Author(s)

View source: R/fitdistrNB.R

Description

Finds the maximum likelihood estimates of the dispersion (k) and mean (mu) parameters of the negative binomial distribution.

Usage

1

Arguments

x

an integer vector

Details

This function lets mu = mean(x) and uses optimize to find k with log likelihood function defined simply as sum(dnbinom(x, k, mu))

Value

A lsit with components estiamte giving the MLE and loglik giving the value of the log likelihood function at the maximum. If var(x) < mean(x) then the MLE does not exist and the funciton returns size = Inf.

Author(s)

Andy Rominger <ajrominger@gmail.com>


ajrominger/RarePlusComMinus documentation built on June 27, 2021, 9:25 p.m.