[R] glm.nb

Ronaldo Reis Jr. chrysopa at insecta.ufv.br
Wed Nov 10 11:59:49 CET 2004


Hi,

I make some simulations with rnbinom and try to test with glm.nb.

But in some data set the glm.nb fail.

Look:

pop <- rnbinom(n=1000,size=1,mu=0.05)
> glm.nb(pop~1,maxit=1000)
Error in while ((it <- it + 1) < limit && abs(del) > eps) { : 
 missing value where TRUE/FALSE needed

look some pop charactetistics:
> summary(pop)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  0.000   0.000   0.000   0.052   0.000   2.000

> hist(pop,plot=F)
$breaks
 [1] 0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0

$counts
 [1] 949   0   0   0  50   0   0   0   0   1

$intensities
 [1] 4.744999 0.000000 0.000000 0.000000 0.250000 0.000000 0.000000 0.000000
 [9] 0.000000 0.005000

$density
 [1] 4.744999 0.000000 0.000000 0.000000 0.250000 0.000000 0.000000 0.000000
 [9] 0.000000 0.005000

$mids
 [1] 0.1 0.3 0.5 0.7 0.9 1.1 1.3 1.5 1.7 1.9

My question is:

Why this error occour and how to solve this problem without increase the mu 
parameter in rnbinom?


Thanks fo all

Ronaldo

---
Your ignorance cramps my conversation.
--
|>   // | \\   [***********************************]
|   ( õ   õ )  [Ronaldo Reis Júnior                ]
|>      V      [UFV/DBA-Entomologia                ]
|    /     \   [36571-000 Viçosa - MG              ]
|>  /(.''`.)\  [Fone: 31-3899-2532                 ]
|  /(: :'  :)\ [chrysopa at insecta.ufv.br            ]
|>/ (`. `'` ) \[ICQ#: 5692561 | LinuxUser#: 205366 ]
|    ( `-  )   [***********************************]
|>>  _/   \_Powered by GNU/Debian Woody/Sarge




More information about the R-help mailing list