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
Calabrese bias correction (Maximum likelihood) #28
Comments
Dear Damaris, First thank you for your code review and all my apologies for the mistake. In fact, the Calabrese method was just implemented at the end after a reviewer of the article ask for it and has not been reviewed nor tested in detail. So I would not be surprised of such a mistake and again I apologize. I kind of lack of time right now but effectively what the code does is using the linear model coefficients to correct occurrence probabilities. So if you have the time, I would be glad to review a pull request from you to do the correction. If not I will try to correct it but latter. Best, Sylvain |
Dear Sylvain, thanks for your response. I am not actually using your package as I have my own class of models that is not transformed easily into your objects. Thus, pulling and changing your code is impractical for me. Anyway, I find it important that the method is revised and people do not mistake it for the actual Calabrese correction. Best, Damaris
|
Working on it. |
Wow, it's kind of the issue of not having everything under formal testing. To be fixed thus. But to be honest part of the |
I think you did a good job ! It's not at all the same approach. The previous implementation was a simple linear regression used to adjust the richness prediction, and not at all the method described by Calabrese. Damaris used correctly their method (I think they even published with it) and was kind enough to furnish their code. So let's integrate your implementation to |
Thanks. I'd like to see what the result looks like for a larger dataset with more co-occurences, I guess this can change the picture quite a bit. Do I get it right, that the above maps show the occurrence probability of all species occurring together in one site? And yes, regarding your comment on package dependencies: |
Should the old 'MaximumLikelihood' stacking method either be removed and replaced by the real one or be renamed (e.g. something like 'LinearRegression') and the real Calabrese method gets its name ('MaximumLikelihood' or 'Calabrese')? |
The old 'MaximumLikelihood' stacking method should be replaced by the real one. |
implemented since v0.2.6.9001 |
Thanks for the cleaning of Issues ;) |
Dear Sylvain,
we were looking at your package recently as we were interested whether anybody has implemented the bias correction in MEMs proposed by Calabrese et al. 2014. However, when looking at your code, this does not seem to implement the procedure as described by Calabrese, unless I am completely misinterpreting your code. Your code:
Your code seems to simply regress observed against predicted richness and then uses the LM coefficients to correct occurrence probabilities. This seems different from what Calabrese et al. suggested: 1) logit-transform the occurrence probabilities, 2) apply additive adjustment that depends on richness, 3) then inverse-logit-transform back to probability scale. The adjustment parameters are estimated via maximum likelihood (using the package poibin), identifying the set of adjustment parameters that maximises the probability of the site-specific species richness given the adjusted occurrence probabilities (which depend on the original occurrence probabilities and on the adjustment parameters). Unless I am completely mistaken, this is not what your code is doing?
Best, Damaris
The text was updated successfully, but these errors were encountered: