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 = sqrt(.Machine$single.eps), trace = F)

REQUIRED ARGUMENTS:

y
Vector of observed values from the Negative Binomial.
mu
Estimated mean vector.

OPTIONAL ARGUMENTS:

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:

, ,

EXAMPLES:

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