raremax value >2, cannot run rarefy

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

raremax value >2, cannot run rarefy

Ansley Silva
Hello,

R version 3.2.2, using the vegan package.

I am using the rarefy function to get rarefied values for my rarefaction
curves.
​Please see the attached data and code.
Instead of getting an output from rarefy function of values for S and SE, I
am getting the following message:
"There were 20 warnings (use warnings() to see them)"
It seems that the issue might be that my raremax value for this dataset is
equal to 1.  When I ran the same code on a dataset with a raremax of 5,
everything is okay.  When I ran the same code on a dataset with a raremax
of 0, my output of S and SE were all 0.
I am looking for an explanation for this.  Is there a way to get better
values for the output?  Would PC-ORD do the same thing?

Thanks much,


--
Ansley Silva


*"The clearest way into the Universe is through a forest wilderness." John
Muir*


*Graduate Research Assistant*

*University of Georgia*

*D.B. Warnell School of Forestry and Natural Resources*

*180 East Green Street*

*Athens, GA 30602*

_______________________________________________
R-sig-ecology mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology

raremax.txt (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: raremax value >2, cannot run rarefy

Jari Oksanen
I cannot reproduce anything of this. I cannot see your csv files, and cannot reproduce the analysis. I can see one attached file (raremax.txt) that has a structure that you call "data". When I use that in place of patp (that I don't have), everything runs smoothly. I have no idea what were the warnings you got -- did you use warnings() to see them like the output suggested? Were those warnings? Did they give any useful hints?

A few words about the extremes you drove rarefy: if you rarefy your community to one individual, you will have one species (and  no error), and if you rarefy to zero individuals have zero species. It never occurred to me to test the function with these absurd values. It is nice to see that zero species with zero error was correctly returned. However, it seems that with rarefaction to one individual the number of species (1) was correctly reported, but the function tried to estimate the standard error in vain with some numerical problems: the standard error should be zero exactly, but the function found zero numerically (about plus/minus 0.00000003), and when this numerical zero was negative, you got a warning of taking square root of negative values of magnitude sqrt(-1e-16).

You cannot meaningfully rarefy to one individual. The lowest you can do meaningfully is to rarefy to two individuals. You cannot meaningfully ask how many species you have if you have nothing (zero), or if you only have one individual (one). Think about it.

Cheers, Jari Oksanen
________________________________________
From: R-sig-ecology <[hidden email]> on behalf of Ansley Silva <[hidden email]>
Sent: 04 August 2016 23:30
To: [hidden email]
Subject: [R-sig-eco] raremax value >2, cannot run rarefy

Hello,

R version 3.2.2, using the vegan package.

I am using the rarefy function to get rarefied values for my rarefaction
curves.
​Please see the attached data and code.
Instead of getting an output from rarefy function of values for S and SE, I
am getting the following message:
"There were 20 warnings (use warnings() to see them)"
It seems that the issue might be that my raremax value for this dataset is
equal to 1.  When I ran the same code on a dataset with a raremax of 5,
everything is okay.  When I ran the same code on a dataset with a raremax
of 0, my output of S and SE were all 0.
I am looking for an explanation for this.  Is there a way to get better
values for the output?  Would PC-ORD do the same thing?

Thanks much,


--
Ansley Silva


*"The clearest way into the Universe is through a forest wilderness." John
Muir*


*Graduate Research Assistant*

*University of Georgia*

*D.B. Warnell School of Forestry and Natural Resources*

*180 East Green Street*

*Athens, GA 30602*
_______________________________________________
R-sig-ecology mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology