Thank you very much Mollie.

Best,

Manuel


2013/2/3 Mollie Brooks <mbro...@ufl.edu>

> Hi Manuel,
> This means that your data is closer to Poisson.
> Here is an example where I simulate Poisson data and try to fit the NB
> distribution. I get behavior from glm.nb that is similar to your results
> (large dispersion parameter and warning about iteration limit reached).
>
> x=rep(1:5, 10)
> y=rpois(n=length(x), lambda=exp(x*.5+1))
> dat=data.frame(x=x,y=y)
> library("MASS")
> m1=glm.nb(y~x, dat)
> m2=glm(y~x, dat, family="poisson")
>
> Try using glm instead of glm.nb
>
> cheers,
> Mollie
>
> Mollie Brooks
> Postdoctoral Researcher, Ponciano Lab
> Biology Department, University of Florida
> http://people.biology.ufl.edu/mbrooks
>
>
> On 3 Feb 2013, at 10:16 AM, Manuel Spínola wrote:
>
> Dear list members,
>
> I am fitting a negative binomial model but I get a very large dispersion
> parameter.  Why is that?
>
> quine.nb2 <- glm.nb(Pt ~ Agua + Dist10, data = Abundancia)
>
> summary(quine.nb2)
>
> Deviance Residuals:
>     Min        1Q    Median        3Q       Max
> -2.20911  -0.67157   0.04411   0.35695   1.65524
>
> Coefficients:
>              Estimate Std. Error z value Pr(>|z|)
> (Intercept)   -0.88354    0.43982  -2.009   0.0445 *
> Agua[T.negra]  0.89319    0.43727   2.043   0.0411 *
> Dist10         0.39416    0.04387   8.984   <2e-16 ***
> ---
> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
>
> (Dispersion parameter for Negative Binomial(67552.88) family taken to be 1)
>
>    Null deviance: 128.567  on 15  degrees of freedom
> Residual deviance:  17.005  on 13  degrees of freedom
> AIC: 67.058
>
> Number of Fisher Scoring iterations: 1
>
>
>              Theta:  67553
>          Std. Err.:  1428117
> Warning while fitting theta: iteration limit reached
>
> 2 x log-likelihood:  -59.058
>
>
> Best,
>
> Manuel
>
> --
> *Manuel Spínola, Ph.D.*
>
> Instituto Internacional en Conservación y Manejo de Vida Silvestre
> Universidad Nacional
> Apartado 1350-3000
> Heredia
> COSTA RICA
> mspin...@una.ac.cr
> mspinol...@gmail.com
> Teléfono: (506) 2277-3598
> Fax: (506) 2237-7036
> Personal website: Lobito de río <
> https://sites.google.com/site/lobitoderio/>
> Institutional website: ICOMVIS <http://www.icomvis.una.ac.cr/>
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>
>
>


-- 
*Manuel Spínola, Ph.D.*
Instituto Internacional en Conservación y Manejo de Vida Silvestre
Universidad Nacional
Apartado 1350-3000
Heredia
COSTA RICA
mspin...@una.ac.cr
mspinol...@gmail.com
Teléfono: (506) 2277-3598
Fax: (506) 2237-7036
Personal website: Lobito de río <https://sites.google.com/site/lobitoderio/>
Institutional website: ICOMVIS <http://www.icomvis.una.ac.cr/>

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology

Reply via email to