How to implement the Log Gaussian Cox Process in TMB

13 views
Skip to first unread message

houessou madjid

unread,
Jun 12, 2025, 9:20:29 AMJun 12
to TMB Users
Hi all,  
I am trying to implement the LGCP in TMB in which i approximate the gaussian random field by a linear combinaison of basis function and random coefficient.  The model then became a  GLMM. 
But I am getting an error while optimizing the objective function. 
In attach the code i am running and below the error i got

Error in nlminb(POobj_CMP$par, POobj_CMP$fn, POobj_CMP$gr, control = list(rel.tol = 1e-08)) : 
  NA/NaN gradient evaluation
In addition: Warning messages:
1: In nlminb(POobj_CMP$par, POobj_CMP$fn, POobj_CMP$gr, control = list(rel.tol = 1e-08)) :
  NA/NaN function evaluation
2: In nlminb(POobj_CMP$par, POobj_CMP$fn, POobj_CMP$gr, control = list(rel.tol = 1e-08)) :
  NA/NaN function evaluation
3: In nlminb(POobj_CMP$par, POobj_CMP$fn, POobj_CMP$gr, control = list(rel.tol = 1e-08)) :
  NA/NaN function evaluation
4: In nlminb(POobj_CMP$par, POobj_CMP$fn, POobj_CMP$gr, control = list(rel.tol = 1e-08)) :
  NA/NaN function evaluation
5: In nlminb(POobj_CMP$par, POobj_CMP$fn, POobj_CMP$gr, control = list(rel.tol = 1e-08)) :
  NA/NaN function evaluation

I replaced the weight of points process by 1e-10 but it still did compile.

Any help will be very appreciate.

Cheers,





LGCPnlimb.R
Reply all
Reply to author
Forward
0 new messages