When the function to be monimized in in GenSA keeps returning -inf the random generation of parameters is always the same, even when set.seed() takes different values. I don't know if this is actually desired but this is problematic for fitMC().
A workaround is to replace -inf by a very large negative value but this has some limits.
When the function to be monimized in in GenSA keeps returning
-inf
the random generation of parameters is always the same, even whenset.seed()
takes different values. I don't know if this is actually desired but this is problematic forfitMC()
.A workaround is to replace
-inf
by a very large negative value but this has some limits.Reprex:
and check the values printed in both case.