JohnsonHsieh / iNEXT

R package for interpolation and extrapolation
https://JohnsonHsieh.github.com/iNEXT
57 stars 26 forks source link

estimateD - Only one species error in sample with many species. #15

Open dleopold opened 7 years ago

dleopold commented 7 years ago

I am receiving an error that my sample has only one species when running estimateD, though it has ~30 species. I do not get an error if I set conf = NULL. This sample has no singletons and if I add a few the error goes away. However, the error is a bit confusing given the data. Should I be concerned with the error for my actual data? Here is the example:

> test1
[1] 18968 10598   672  2761   360    83    36    53    55    38    73    12   234    29    22    41    42   476    36    15    49    54    72
[24]    29     4    44    15    95    49
> estimateD(test1,base="size",level=10000,conf = 0.95)
      m       method order SC     qD qD.LCL qD.UCL
1 10000 interpolated     0  1 28.708 28.312 29.105
2 10000 interpolated     1  1  3.614  3.564  3.664
3 10000 interpolated     2  1  2.551  2.526  2.575
Warning messages:
1: In EstiBootComm.Ind(Spec) :
  This site has only one species. Estimation is not robust.
2: In EstiBootComm.Ind(Spec) :
  This site has only one species. Estimation is not robust.
3: In EstiBootComm.Ind(Spec) :
  This site has only one species. Estimation is not robust.

Now with a few singletons:

> test1 <- c(test1,1,1)
> estimateD(test1,base="size",level=10000,conf = 0.95)
      m       method order SC     qD qD.LCL qD.UCL
1 10000 interpolated     0  1 29.279 28.627 29.931
2 10000 interpolated     1  1  3.616  3.570  3.663
3 10000 interpolated     2  1  2.551  2.524  2.577
JohnsonHsieh commented 7 years ago

Thx for this report, this is a unreasonable warning messages. It would be fixed in next version.