KaiHsiangHu / iNEXT.beta3D

iNterpolation and EXTrapolation with beta diversity for three dimensions of biodiversity
2 stars 3 forks source link

Warning: This site has only one species. Estimation is not robust #5

Open ThomasLuypaert opened 7 months ago

ThomasLuypaert commented 7 months ago

Hi @KaiHsiangHu,

First of all, thank you for this package, I've really enjoyed using it!

I wanted to check in with an issue I am having, which seems to be something that iNEXT experienced previously.

I am running the iNEXT.beta3D function on a list containing two data frames (A = 108 rows 90 columns; B = 108 rows 66 columns). However, when running the command as specified in the vignette, I get the following error:

Warning: This site has only one species. Estimation is not robust.Warning: This site has only one species. Estimation is not robust.Warning: This site has only one species. Estimation is not robust.Warning: This site has only one species. Estimation is not robust.Warning: This site has only one species. Estimation is not robust.Warning: This site has only one species. Estimation is not robust.Warning: This site has only one species. Estimation is not robust.Warning: This site has only one species. Estimation is not robust.Warning: This site has only one species. Estimation is not robust.Error in if (f0.hat == 0) { : missing value where TRUE/FALSE needed

I did a bit of googling, at it seems like it has something to do with the presence of samples with only one detected species? As a test, I removed any sample that only had one detected species for each assemblage. When running iNEXT.beta3D on this filtered dataset, the function runs, but still produces the same warning message over and over again:

... Estimation is not robust.Warning: This site has only one species. Estimation is not robust.Warning: This site has only one species. Estimation is not robust.Warning: This site has only one species. Estimation is not robust.Warning: This site has only one species. Estimation is not robust.Warning: This site has only one species. Estimation is not robust.Warning: This site has only one species. Estimation is not robust.Warning: This site has only one species. Estimation is not robust.Warning: This site has only one species. Estimation is not robust.Warning: This site has only one species. Estimation is not robust.Warning: This site has only one species. Estimation is not robust.Warning: This site has only one species. Estimation is not robust.Warning: This site has only one species. Estimation is not robust.Warning: This site has only one species. Estimation is not robust.Warning: ...

I am not sure why this problem arises, or whether this means my results are not robust. Below is an image of the output. The results seem OK for alpha and gamma, but I am not sure if the weird behavior of beta is the result of this error, or insufficient data.

image

Please let me know if you need a data example to understand the issue.

Any help is greatly appreciated.

Cheers, Thomas

KaiHsiangHu commented 7 months ago

Dear @ThomasLuypaert ,

Thank you for your support and praise to our package!

I guess the error in the first time is due to computation when doing bootstrap. It is our fault, sorry. Besides, the warnings is due to the sparse data (some assemblages in a dataset have too less data, it will cause iNEXT beta estimation has bias). My suggestion is maybe you can pooling data (because it contains 90 and 66 assemblages in each dataset TF and VZ), or please collect more abundance data for computation.

If you want to analyze beta diversity between 90 and 66 assemblages, you can try to plot size-based gamma and alpha diversity to see whether the curves is converge to stable? If yes, then you can use asymptotic (coverage = 1) coverage-based gamma, alpha, and beta diversity for analyze. If not, I suggest use "coverage = Cmax" (the end point of curve for beta diversity) for order q = 0 and "coverage =1" for order q = 1, 2. Under order q = 0, it is not reliable for asymptotic beta diversity value (due to a lower bound).

Thanks again. Hope to solve your question! Any question please let me know again!

Best regards