theta.mm {MASS} | R Documentation |
Given the mean estimate, calculate the moment estimator of theta by
equating
sum((y-mu)^2/(mu+mu^2/theta))
to the residual degrees of
freedom.
theta.mm(y, u, dfr, limit=10, eps=sqrt(.Machine$single.eps))
y |
Vector of observed values from the Negative Binomial. |
u |
Estimated mean vector. |
dfr |
Residual degrees of freedom (assuming theta known).
|
limit |
Limit on the number of iterations. |
eps |
Tolerance to determine convergence. |
The required estimate of theta
, as a scalar.
theta <- theta.mm(y, fitted(fm), dfr=123)