Main Content

nbinfit

Negative binomial parameter estimates

Syntax

parmhat = nbinfit(data)
[parmhat,parmci] = nbinfit(data,alpha)
[...] = nbinfit(data,alpha,options)

Description

parmhat = nbinfit(data)returns the maximum likelihood estimates (MLEs) of the parameters of the negative binomial distribution given the data in the vectordata.

[parmhat,parmci] = nbinfit(data,alpha)returns MLEs and100(1-alpha)percent confidence intervals. By default,alpha = 0.05, which corresponds to 95% confidence intervals.

[...] = nbinfit(data,alpha,options)accepts a structure,options, that specifies control parameters for the iterative algorithm the function uses to compute maximum likelihood estimates. The negative binomial fit function accepts anoptionsstructure which you can create using the functionstatset. Enterstatset('nbinfit')to see the names and default values of the parameters thatnbinfitaccepts in theoptionsstructure. See the reference page forstatsetfor more information about these options.

Note

The variance of a negative binomial distribution is greater than its mean. If the sample variance of the data indatais less than its sample mean,nbinfitcannot compute MLEs. You should use thepoissfitfunction instead.

Extended Capabilities

Version History

Introduced before R2006a