theta.ml {MASS} | R Documentation

## Estimate theta of the Negative Binomial by Maximum Likelihood

### Description

Given the estimated mean vector, estimate `theta` of the Negative Binomial Distribution.

### Usage

    theta.ml(y, mu, n, limit=10, eps=.Machine$double.eps^0.25, trace=FALSE)

### Arguments

`y` | Vector of observed values from the Negative Binomial.
`mu` | Estimated mean vector.
`n` | Number of data points (defaults to length of `y`)
`limit` | Limit on the number of iterations.
`eps` | Tolerance to determine convergence.
`trace` | logical: should iteration progress be printed?

### Value

The required estimate of `theta`, as a scalar.

### See Also

`glm.nb`, `theta.md`, `theta.mm`

### Examples

    theta <- theta.ml(y, fitted(fm), dfr=123)