beta.sample | R Documentation |
Resamples the 3 multiple-site dissimilarities (turnover, nestedness-resultant fraction, and overall beta diversity) for a subset of sites of the original data frame.
beta.sample(x, index.family="sorensen", sites=nrow(x$data), samples = 1)
x |
data frame, where rows are sites and columns are species. Alternatively |
index.family |
family of dissimilarity indices, partial match of |
sites |
number of sites for which multiple-site dissimilarities will be computed. If not specified, default is all sites. |
samples |
number of repetitions. If not specified, default is 1. |
The function returns a list with a dataframe with the resampled 3 multiple-site dissimilarities
(turnover fraction, nestedness-resultant fraction and overall dissimilarity; see beta.multi
),
a vector with the respective means and a vector with the respective standard deviation.
For index.family="sorensen"
:
sampled.values |
dataframe containing beta.SIM, beta.SNE and beta.SOR for all samples |
mean.values |
vector containing the mean values of beta.SIM, beta.SNE and beta.SOR among samples |
sd.values |
vector containing the sd values of beta.SIM, beta.SNE and beta.SOR among samples |
For index.family="jaccard"
:
sampled.values |
dataframe containing beta.JTU, beta.JNE and beta.JAC for all samples |
mean.values |
vector containing the mean values of beta.JTU, beta.JNE and beta.JAC among samples |
sd.values |
vector containing the sd values of beta.JTU, beta.JNE and beta.JAC among samples |
Andrés Baselga and David Orme
Baselga, A. 2010. Partitioning the turnover and nestedness components of beta diversity. Global Ecology and Biogeography 19:134-143
Baselga, A. 2012. The relationship between species replacement, dissimilarity derived from nestedness, and nestedness. Global Ecology and Biogeography 21, 1223-1232
beta.multi
, beta.sample
, beta.temp
# Read the data for Northern and Southern European cerambycids
data(ceram.s)
data(ceram.n)
# Resample 100 times the multiple-site dissimilarities
# for 10 countries.
beta.ceram.s<-beta.sample(ceram.s, index.family="sor", sites=10, samples=100)
beta.ceram.n<-beta.sample(ceram.n, index.family="sor", sites=10, samples=100)
# Plot the distributions of beta.SIM in Southern Europe (red)
# and Northern Europe (blue)
plot(density(beta.ceram.s$sampled.values$beta.SIM), col="red", xlim=c(0,1))
lines(density(beta.ceram.n$sampled.values$beta.SIM), col="blue")
# Compute the p-value of difference in beta.SIM between South and North
# (i.e. the probability of finding in the North a higher value than
# in the South)
p.value.beta.SIM<-length(which(beta.ceram.s$sampled.values$beta.SIM<
beta.ceram.n$sampled.values$beta.SIM))/100
p.value.beta.SIM
# The result is 0 and we used 100 samples, so p<0.01
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.