[R] Dispersion parameter in Neg Bin GLM

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Jun 30 08:27:05 CEST 2005


On Thu, 30 Jun 2005, Edward McNeil wrote:

> Hi, Can someone tell me if it is possible to set the dispersion 
> parameter constant when fitting a negative binomial glm in R? I've 
> looked at the documentation and can't find the appropriate argument to 
> pass. In STATA I can type: nbreg depvar [indepvar...], offset(offset) 
> dispersion(constant). Thank you

I had to read the STATA documentation.  nbreg does not claim to fit a `Neg 
Bin GLM' and with option dispersion(constant) it is not fitting a GLM at 
all.  See http://www.stata.com/help.cgi?nbreg and
http://www.stata.com/support/faqs/stat/nbreg1.html

So I think you need to think carefully about what you actually want, 
as STATA is not doing what you asked for.

If I had to fit the STATA model in R I would directly maximize the 
likelihood, modifying the example code in MASS4 chapter 16.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list