Description Usage Arguments Details Value Note Author(s) References See Also Examples
Estimate the diversity of a sample(s) using a number of species diversity estimators.
1 | par.spp.est(x, rand = 10, abund = TRUE, counter = FALSE)
|
x |
A vector, matrix or data frame with species as rows and locations/samples as columns |
rand |
The number of times to run the internal randomizations; default is set to 10 |
abund |
If the data is abundance or presence/absence; default is set to TRUE for abundance |
counter |
Whether or not to provide a running total of progress of randomizations |
This function will accept a vector, matrix or data frame of species by samples and return a large matrix with various species estimation values.
Returns a table with the following column names if abund=TRUE
:
N.obs |
Total sample size |
S.obs |
Number of observed species |
S.obs(+95%) |
95% upper confidence interval |
S.obs(-95%) |
95% lower confidence interval |
Chao1 |
Chao Species Estimation |
Chao1(upper) |
95% upper confidence interval |
Chao1(lower) |
95% lower confidence interval |
ACE |
Abundance-based Coverage Estimator |
ACE(upper) |
95% upper confidence interval |
ACE(lower) |
95% lower confidence interval |
Jack1 |
First Order Jacknife Estimator |
Jack1(upper) |
95% upper confidence interval |
Jack1(lower) |
95% lower confidence interval |
Returns a table with the following column names if abund=FALSE
:
N.obs |
Total sample size |
S.obs |
Number of observed species |
S.obs(+95%) |
95% upper confidence interval |
S.obs(-95%) |
95% lower confidence interval |
Chao2 |
Chao Species Estimation |
Chao2(upper) |
95% upper confidence interval |
Chao2(lower) |
95% lower confidence interval |
ICE |
Incidence-based Coverage Estimator |
ICE(upper) |
95% upper confidence interval |
ICE(lower) |
95% lower confidence interval |
Jack1 |
First Order Jacknife Estimator |
Jack1(upper) |
95% upper confidence interval |
Jack1(lower) |
95% lower confidence interval |
This function can be very long to run due to its iterative nature, even when it is running in parallel. The randomizations are initially set to 10 so the process will run relatively quickly, but a low value for randomizations will not give nicely smoothed curves. Also, in some cases due to the nature of some of the functions, they provide no answer, such as is common with the Chao standard deviation. In this case, the Chao upper and lower bounds are simply 95% confidence intervals based on the actual Chao estimator.
This version of the function uses the foreach()
function to parallelize the resampling loop, so any backend that can be used with that package can be used to enable the parallel processing with this package.
Matthew Vavrek
The original idea for a program similar to this came from the extremely useful EstimateS program by Robert K. Colwell
Colwell, R.K. 2010. EstimateS: Statistical estimation of species richness and shared species from samples. Version 8.2. User's Guide and application published at: http://purl.oclc.org/estimates.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ## Not run:
#comparison of run times between the serial and parallel versions on the estimator
#please note that this example is designed for a multicore OS X or Linux computer
library(doMC)
registerDoMC()
data(fdata.mat)
system.time({spp.est(fdata.mat, rand = 100, abund = TRUE, counter = FALSE)})
system.time({par.spp.est(fdata.mat, rand = 100, abund = TRUE, counter = FALSE)})
#this example is for a multicore Windows computer, but HAS NOT BEEN TESTED
library(doSNOW)
library(snow)
cl <- makeCluster(c("localhost","localhost"), type = "SOCK")
registerDoSNOW(c1)
data(fdata.mat)
system.time({spp.est(fdata.mat, rand = 100, abund = TRUE, counter = FALSE)})
system.time({par.spp.est(fdata.mat, rand = 100, abund = TRUE, counter = FALSE)})
stopCluster(cl)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.