Hello everyone,

I have programmed a function and, among other things, it has to compute the 
differential of a function. I have been using the function grad() and I have 
programmed some simulated studies. I have testes with 72,576 different 
combinations of the initial values and now I got an error in only 4 situations.

The error comes from the function grad() and I don't understand why. This is 
the output:
Error in grad.default(Sstar, x = t, dist1 = T1pdist, dist2 = T2pdist,  : 
  function returns NA at 
3.90625e-071.01927622979798e-087.7105723770202e-075.27096223871154e-087.28540377612885e-071.25230637383194e-076.56019362616806e-072.21329924168263e-075.59920075831737e-073.324709613353e-074.487790386647e-070.0001000016964206937.79553579306956e-072.72822299391765e-087.53967770060824e-078.56180755521809e-086.95631924447819e-071.70797994270076e-076.10452005729924e-072.75627788007242e-075.05622211992758e-07
 distance from x.

Anyone knows when returns a NA this function? Anyone knows other function to 
make numerical approximations of the differential?

Thank you for your help,
Oleguer
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to