[R] Problem with glm.nb estimation

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri Oct 3 21:10:48 CEST 2008


I see no error message here -- a *warning* is not an error.

Please give a fully reproducible example with the actual output containing 
an error message.

On Fri, 3 Oct 2008, Roberto Patuelli wrote:

> Dear All,
>
> I've been using already for a year glm.nb() from the MASS package.
> But today, R gave me an error message when estimating one of my usual models:
>
>
>> depEsf.nb <- glm.nb(depE ~ manuf00E + corps00E + lngdp00E + lngdp00sqE + 
>> lnpop00E + indshE + scishE + mechshE + elecshE + chemshE + drugshE + 
>> urban_dummyE + aggl_dummyE
> + + eE1 + eE2 + eE3 + eE4 + eE5 + eE6 + eE7 + eE8 + eE9 + eE10 + eE11 + eE12 
> + eE13 + eE14 + eE15 + eE16 + eE17, maxit = 100000)
> Warning messages:
> 1: In sqrt(1/i) : NaNs produced
> 2: In sqrt(1/i) : NaNs produced
>
>
> What does it mean to receive such a message? And, most of all, can I fix this 
> problem?
> The only problem I could think of is that, for this particular case, I do not 
> have lots of degrees of freedom (N = 67), and I use 30 variables.
> Even if I start from a basic model (no eE... variables) and try to build the 
> model up by step(), the stepwise procedure fails at the first step (I know 
> step() is not made for the glm.nb() function, but it usually works just fine 
> for me).
>
> Thanks in advance to everyone who might drop his/her two cents on what the 
> problem is.
>
> Sincerely,
> Roberto
>
> ********************
> Roberto Patuelli, Ph.D.
> Post-doc researcher
> Institute for Economic Research (IRE)
> University of Lugano (USI)
> via Maderno 24, CP 4361
> CH-6904 Lugano
> Switzerland
> Phone: +41-(0)58-666-4166
> Email: roberto.patuelli at lu.unisi.ch
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
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