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.