Hi folks,
I’m running gmultmix() on fish removal data collected
under the robust design (10 primaries, each with 3 secondaries) across two
sites. I have 16 species, and for some of them, a null model will run just
fine, but for others I get this error:
Error in optim(starts, nll, method = method, hessian = se, ...) :
initial value in 'vmmin' is not finite
I dug through the posts in this group page and got a few ideas – use starting values, try both mixture types, change the method for the optim function, and set se=FALSE – but none of these resolved the problem.
When I used starting values (I tried a wide range of values from reasonable to totally absurd and transformed them like so: starts=c(log(abundanceGuess), qlogis(availGuess), qlogis(detGuess))), sometimes I still got the previous error, and sometimes I got this error, which I assume means that all my starting values were really bad:
Error in optim(starts, nll, method = method, hessian = se, ...) :
function cannot be evaluated at initial parameters
Now the really interesting thing is that I’ve noticed that the species-specific datasets that produce the error are those that had the highest observed counts and widest range of counts. For example, in the yellow perch dataset (which throws the error), on one secondary occasion nearly 250 individuals were removed but the mean number removed across all occasions was 34, and there were multiple occasions when no perch were removed at all. For species with counts between 0 and about 10, and a mean of 1 to 2, the model will run just fine. Given this pattern I’m wondering if there is something fundamentally challenging for the model about having a dataset with counts that vary dramatically from one occasion to the next, and if perhaps it’s not something that can be resolved with starting values?
Any help, suggestions, etc. would be much appreciated. I haven't included any data or code but am happy to provide that if it would be helpful.
Jillian