[R] rarefaction variance

Michael Camann camann at babylon.cnrs.humboldt.edu
Tue Nov 13 20:55:57 CET 2001


Here's a question for ecologists on the r-help list-- I'm addressing this
to ecologists in particular because they're most likely to be familiar
with the equation in question but I'll be happy to discuss the problem
with anyone who's willing to take a whack at it.

I'm trying to write a function to calculate the large sample variance of
species richness estimates by rarefaction using the Heck et al (1975)
equation.  I won't try to reproduce the equation here because it's complex
and I don't know how to render it readibly in ASCII characters, but if
anyone wishes a faxed copy I'll gladly provide one.  If you have Krebs
_Ecological_Methodology_ it's on page 415 of the second edition.  It's on
page 27 of Gotelli and Graves _Null_Models_in_Ecology_, and in lots of
other references as well.

The problem is not the calculations of binary coefficients
(combinatorials) per se-- I use lgamma(x+1) to do it with logs of
factorials-- but rather the 1-(quotient of combinatorials) term in the
first summation which forces me to exp() the log terms before the
calculation is complete.  This invariably causes an overflow (Inf) with
all but the most unrealistically small data sets.

So, my questions are: 1) has anyone written an R function to calculate
this variance and would they be willing to share it, and 2) failing #1, is
anyone familiar with this equation willing to take a whack at helping me
write such a function?  As I said, I'll be happy to fax a copy of the
equation to anyone who does not have it handy but who wants to help solve
this problem.

Thanks in advance!

--Mike C.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Michael A. Camann                                  Voice: 707-826-3676
Associate Professor of Zoology                       Fax: 707-826-3201
Institute for Forest Canopy Research     Email: mac24 at axe.humboldt.edu
Department of Biology                            ifcr at axe.humboldt.edu
Humboldt State University           
Arcata, CA 95521

                 URL:http://www.humboldt.edu/~mac24/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list