[ADMB Users] log_density_poisson

Mark Payne mpa at aqua.dtu.dk
Mon Feb 7 07:57:44 PST 2011


Hi,

I seem to be doing something stupid, but I'm really unsure what it is. Can anyone help?

My model is fairly simple - essentially a set of Poisson distributed larval count observations that I am trying to model in a likelihood framework. I have written my likelihood as such:

  //Now calculate the contribution to the likelihood
  for(int ihaul=1;ihaul<=nhauls;ihaul++) {
    model_concs_nll(ihaul)= -log_density_poisson(nlarv(ihaul),model_concs(ihaul)) ;
  }

  //...and the likelihoods
  nll = sum(model_concs_nll);

The problem is that this really seems to break ADMB - below is the output. Note that there are zero iterations, and that the gradients are all NaN. 

 - final statistics:
7 variables; iteration 0; function evaluation 0
Function value   6.7970e+04; maximum gradient component mag   0.0000e+00
Exit code = 0;  converg criter   1.0000e-04
Var   Value    Gradient   |Var   Value    Gradient   |Var   Value    Gradient
  1 12.18473         -nan |  2 12.18473         -nan |  3 12.18473         -nan
  4 12.18473         -nan |  5 12.18473         -nan |  6 12.18473         -nan
  7 12.18473         -nan |
REPORT SECTION.......
Estimating row 1 out of 7 for hessian
Estimating row 2 out of 7 for hessian
Estimating row 3 out of 7 for hessian
Estimating row 4 out of 7 for hessian
Estimating row 5 out of 7 for hessian
Estimating row 6 out of 7 for hessian
Estimating row 7 out of 7 for hessian


This strikes me that I am doing something badly wrong - my guess is that it is related to the log_density_poisson function.

Does anyone have any insights?

Cheers,

Mark



More information about the Users mailing list