Log Gaussian Cox Process in TMB

31 views
Skip to first unread message

houessou madjid

unread,
Jun 16, 2025, 11:14:11 PMJun 16
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 is an extension of the one in this paper https://doi.org/10.1111/2041-210X.14252It then became a  GLMM. 

Concretely, the model is defined  : \ln(\lambda(s_i,t)) &= X(s_i,t)\beta+\{Z(s) \otimes Z(t)\}^T u with with $u \sim \mathcal{N}(0,\sigma^{2}\mathbf{I})$.

But I'm getting an error while optimising the objective function to estimate parameters. 

This is the error message that i received : 

In readLines(file) : incomplete final line found on 'POlikelihood_V1.cpp'

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


In attach, the simulation code that i ran.

I tried a couple of things such as :

 model with only fixed effects

 change the points process weights to 1e-10 (in order to avoid 0s)

 change initial values for parameters optimization

- use other optimizer (BFGS)


But none of them worked.

Any advice would be extremely helpful and much appreciated.

Regards,

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