Skip to content
Prev 14580 / 20628 Next

glmmADMB fails to fit poisson data

On the other hand maybe the code never will write itself. The following 
change to the Poisson
model in glmmadmb  using the log(1_+y_i) transformation to get good 
initial parameter estimates
converges nicely on this data set.

     case 0:   // Poisson
       if (cph<2)
         tmpl=-square(log(1.0+y(_i,1))-log(1.0+lambda));
       else
         tmpl= log_density_poisson(y(_i,1),lambda);
       break;
     case 1:   // Binomial: y(_i,1)=#successes, y(_i,2)=#failures,