fitNB2 {WALS} | R Documentation |
Internal function: Fits a NB2 regression via maximum likelihood with log-link for mean and dispersion parameter.
Description
Internal fitting function for NB2 regression models. Used for fitting the
starting values of the one-step ML estimators in walsNB
. Only
works with log-link so far, no other links tested.
Usage
fitNB2(X, Y, family, control = controlNB())
Arguments
X |
Design matrix. |
Y |
Count response vector. |
family |
Object of class |
control |
List of parameters for controlling the optimization process.
Use |
Details
The available parameters for controlling the optimization are documented in
controlNB
.
Value
A list with the following elements
coefficients |
fitted coefficients from NB2 regression |
theta |
fitted dispersion parameter from NB2 regression |
convergence |
0 indicates successful completion. All error codes except
for
|
ll |
log-likelihood of fitted NB2 regression model |
message |
If |
start |
If |
See Also
controlNB, negbinWALS, glm.nb, optim.