Skip to content
Prev 131974 / 398506 Next

Defining the "random" term in function "negbin" of AOD package

Dear Caroline
The random argument is used to specify either a global parameter "phi" (random = ~ 1) or specific parameters "phi" for the levels of a given group factor (random = ~ group) (see ?negbin for what represents "phi" in negbin: Var[y] = ? + phi * ?^2)

In your example, it shoud be: negbin(formula = ..., random = ~ 1, data = ...)

Note that if your model has too many parameters, negbin may fail to reach the MLE.

You also can try the package 'gamlss' on CRAN. For your example, you can use the function gamlss as follows:

fm <- gamlss(formula = ..., family = NBI, sigma.formula = ~ 1, data = ...)
summary(fm)

Regards

ML


--------------------------------------------------
Matthieu Lesnoff
International Livestock Research Institute (ILRI)
PO BOX 30709, Nairobi, 00100 GPO, Kenya
Tel:   Off: (+254) 20 422 3000 (ext. 4801)
       Res: (+254) 20 422 3134
       Mob: (+254) 725 785 570
       Sec: (+254) 20 422 3013 
Fax: (+254) 20 422 3001
Email: m.lesnoff at cgiar.org 
--------------------------------------------------