-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when fitting Fisher's log series #135
Comments
Hello! This is expected sometimes, as the numeric optimization is a somewhat delicate process, and we have tried to provide initial guesses and optimzation parameter that work well for larger published datasets. If you have a good guess of the model parameters, it helps to provide it as the fitsad(abundance, sad = "ls", start.value=200) Unfortunately, there is no general rule for what to do when the model fitting fails. |
Thanks for your response! Interestingly, if we assume that the function is decreasing (which seems reasonable for Fisher's log-series, if not all SADs), we can specify that to uniroot (using For example, taking the code from your fitls function:
alfa = 324.533 Do you see that as a good solution? Or there are caveats? |
Your solution reached a higher likelihood value, nice! I am flagging this issue as an 'enhancement'. We wiil check if we can inlude this improvement in the next version. Thanks. |
Hi,
First of all, thanks for the great package!
We are using it to fit SADs to a number of communities but find errors sometimes. A reproducible example:
Gives error:
Error in uniroot(f1, interval = c(1/N, N)) :
f() values at end points not of opposite sign
Is that expected for some communities in which abundance data don't fit this model, or is there something else going on?
Many thanks in advance
The text was updated successfully, but these errors were encountered: