stateline
stateline copied to clipboard
Issues handling Inf likelihoods
The refactor of the stateline code is great! However, it seems a bug may have crept in in the handling of Inf likelihoods. Our model has a strong boundary for plausible parameters, beyond which the nll returned is Inf. In the older stateline, the algorithm would detect the Inf and search around to find a reasonable starting position. In the refactored code, we never seem to find the plausible region.
It turns out this is not a problem with algorithm so much as detecting an Inf correctly. @lmccalman suggested instead of returning Inf we return a very big number (e.g. max float). Indeed, when I do this stateline works as expected, i.e. finds plausible regions.