-
Notifications
You must be signed in to change notification settings - Fork 18
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
Negative S_PIE values when very small non integer abundances #258
Comments
Thanks for noting this @AlbanSagouis ! The function that needs to be changed is |
But I should note at a minimum if users are trying to use non-integer abundances then we should give them a warning since we don't currently support that. |
Yes, there are several cases where people want to use non-integer abundances. Even when it's not percent cover. For example, if averages are taken beforehand. Not ideal, I know. But often the field worker thinks it's the right thing to do, for standardization, etc. So, while it's not a priority per se, we need to deal with it. When Felix dealt with this for our fragmentation paper, we 1) rounded up to nearest integer, 2) used rarefaction anyway and it worked (except not for Spie clearly). I think we need to give some advice. My gut feeling is 'nearest integer' works fine, and maybe should make that a default? |
Thanks, Alban. In my opinion, we should return an error when this happens (in all functions). If a user thinks it's a good decision to round the data to integers, they can do that. But I wouldn't want to do it for them by default when I can't be sure what the data represent. |
I implemented the changes we discussed here: 4114e96 So, now there is a new function calc_SPIE that can be used to calculate SPIE, while calc_PIE should only be used to calculate PIE. This means calc_PIE no longer has the ENS argument. Please, try it out and tell me if it behaves as expected. |
Hey @T-Engel I like your changes but we still had that pesky problem of PIE getting set to 1 when no individuals were in the sample so I fixed that here: 242625e Also I made other small changes to the code style and documentation. Has anyone published PIE values we can test against? Otherwise we need to put together an example we've computed by hand to run tests against. I can't stress how important a test for PIE is for the package. We have tests for the rarefaction piece though: https://github.com/MoBiodiv/mobr/blob/master/tests/testthat/test_rarefaction.R |
Thanks! calc_div(index = 'S_PIE') error message makes total sense!
|
- both functions get the replace argument - use calc_SPIE when index="S_PIE - documentation #258 (comment)
Thanks for catching that, Dan! Yes a test would be good. Do you think we could just compare it to vegan? @AlbanSagouis. Oh yeah, that makes sense too. This is because we hadn't updated the rest of the code. I just changed calc_div() and calc_comm_div() here 8f479b2. Now they should work too. |
Thanks, Dan. I promise I will spell out TRUE and FALSE in future 😅 |
i'm the disappointed dad :P
…On Thu, Dec 10, 2020 at 10:53 AM T-Engel ***@***.***> wrote:
Thanks, Dan. I promise I will spell out TRUE and FALSE in future 😅
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#258 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJCT3JZ2HLCUB36IJC6K3TSUDVIXANCNFSM4UTUC7FQ>
.
--
Daniel J. McGlinn, PhD
Associate Professor
mailing address:
Department of Biology
College of Charleston
66 George Street
Charleston, SC 29424
https://www.mcglinnlab.org
physical address:
Rita Hollings Science Center (office: 239, lab: 292)
58 Coming Street, Suite 245-255
Charleston, SC 29401
office: 843-953-0190
|
When the abundance matrix mostly has small non integer values (because of standardisation), S_PIE is negative:
Printing a warning could help draw attention to these communities or the functioning of S_PIE?
The text was updated successfully, but these errors were encountered: