Running examples in ‘aod-Ex.R’ failed
The error most likely occurred in:

> ### Name: negbin
> ### Title: Negative-Binomial Model for Counts
> ### Aliases: negbin
> ### Keywords: regression
> 
> ### ** Examples
> 
>   # without offset
>   data(salmonella)
>   negbin(y ~ log(dose + 10) + dose, ~ 1, salmonella)
Negative-binomial model
-----------------------
negbin(formula = y ~ log(dose + 10) + dose, random = ~1, data = salmonella)

Convergence was obtained after 165 iterations.

Fixed-effect coefficients:
                 Estimate Std. Error    z value Pr(> |z|)
(Intercept)     2.198e+00  3.566e-01  6.162e+00 7.192e-10
log(dose + 10)  3.125e-01  9.940e-02  3.144e+00 1.666e-03
dose           -9.804e-04  4.813e-04 -2.037e+00 4.166e-02

Overdispersion coefficients:
                 Estimate Std. Error   z value   Pr(> z)
phi.(Intercept) 4.878e-02  3.238e-02 1.506e+00 6.601e-02

Log-likelihood statistics
   Log-lik      nbpar    df res.   Deviance        AIC       AICc 
-6.289e+01          4         14  3.324e+01  1.338e+02  1.369e+02 
>   library(MASS) # function glm.nb in MASS
>   fm.nb <- glm.nb(y ~ log(dose + 10) + dose,
+                   link = log, data = salmonella)
>   coef(fm.nb)
   (Intercept) log(dose + 10)           dose 
  2.1976273870   0.3125097501  -0.0009802996 
>   1 / fm.nb$theta # theta = 1 / phi
[1] 0.0487684
>   c(logLik(fm.nb), AIC(fm.nb))
[1] -62.88959 133.77918
>   # with offset
>   data(dja)
>   negbin(y ~ group + offset(log(trisk)), ~ group, dja)
Negative-binomial model
-----------------------
negbin(formula = y ~ group + offset(log(trisk)), random = ~group, 
    data = dja)

Convergence was obtained after 243 iterations.

Fixed-effect coefficients:
              Estimate Std. Error    z value Pr(> |z|)
(Intercept) -5.404e-01  2.297e-01 -2.353e+00 1.863e-02
groupTREAT  -1.035e+00  2.616e-01 -3.958e+00 7.553e-05

Overdispersion coefficients:
                Estimate Std. Error   z value   Pr(> z)
phi.groupCTRL  8.389e-01  4.181e-01 2.007e+00 2.239e-02
phi.groupTREAT 1.857e-07  2.000e-13 0.000e+00 1.000e+00

Log-likelihood statistics
   Log-lik      nbpar    df res.   Deviance        AIC       AICc 
-1.212e+02          4         71  1.118e+02  2.503e+02  2.509e+02 
>   # phi fixed to zero in group TREAT
>   negbin(y ~ group + offset(log(trisk)), ~ group, dja,
+     fixpar = list(4, 0))
Negative-binomial model
-----------------------
negbin(formula = y ~ group + offset(log(trisk)), random = ~group, 
    data = dja, fixpar = list(4, 0))

Convergence was obtained after 113 iterations.

Fixed-effect coefficients:
              Estimate Std. Error    z value Pr(> |z|)
(Intercept) -5.526e-01  2.277e-01 -2.427e+00 1.524e-02
groupTREAT  -1.020e+00  2.598e-01 -3.929e+00 8.542e-05

Overdispersion coefficients:
               Estimate Std. Error   z value   Pr(> z)
phi.groupCTRL 8.287e-01   4.12e-01 2.012e+00 2.213e-02

Overdispersion coefficients set to fixed values:
               Value
phi.groupTREAT     0

Log-likelihood statistics
   Log-lik      nbpar    df res.   Deviance        AIC       AICc 
-1.211e+02          3         72  1.118e+02  2.483e+02  2.486e+02 
>   # glim without overdispersion
>   summary(glm(y ~ group + offset(log(trisk)),
+     family = poisson, data = dja))

Call:
glm(formula = y ~ group + offset(log(trisk)), family = poisson, 
    data = dja)

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-3.3888  -1.0801  -0.1201   0.6566   3.7450  

Coefficients:
            Estimate Std. Error z value Pr(>|z|)    
(Intercept)  -0.6975     0.1170  -5.960 2.53e-09 ***
groupTREAT   -0.8754     0.1712  -5.112 3.19e-07 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for poisson family taken to be 1)

    Null deviance: 162.67  on 74  degrees of freedom
Residual deviance: 136.86  on 73  degrees of freedom
AIC: 271.33

Number of Fisher Scoring iterations: 5

>   # phi fixed to zero in both groups
>   negbin(y ~ group + offset(log(trisk)), ~ group, dja,
+     fixpar = list(c(3, 4), c(0, 0))) 

 *** caught segfault ***
address 70, cause 'memory not mapped'