Closed geryan closed 5 years ago
Still getting this issue with low fecundity - not sure if related to handling the multinomial issue #18
The error was generated by this line: prop_in <- sum(pop_new, na.rm = TRUE) / sum(popmat_orig, na.rm = TRUE)
When all populations were zero, it was resulting in a NaN. Fixed by adding a conditional:
if (!is.nan(prop_in)) { pop_new[!missing] <- pop_new[!missing] / prop_in }
Related error:
This error appears instead when a low value for fecundity is used. E.g.:
Originally posted by @geryan in https://github.com/steps-dev/steps/issues/18#issuecomment-479731912