bray0: Zero-adjusted Bray-Curtis dissimilarity

Description Usage Arguments Details Value References See Also Examples

Description

Dissimilarity measure when some sites are empty or share no species in common with other sites.

Usage

1
bray0(x, ...)

Arguments

x

array of species data, where rows = SUs and cols = species

...

further arguments passed to other methods

Details

In community data with high beta-diversity, you may find that many pairs of sample units do not share any species in common. In this situation, bounded dissimilarity measures such as Bray-Curtis tend to 'saturate' at 1, and which provide little information about 'true' dissimilarity of 'no-share' sample unit pairs (Smith 2017). Clarke et al. (2006) proposed a 'zero-adjusted Bray-Curtis' measure by effectively adding a dummy species to the every sample unit prior to calculation of the dissimilarity matrix. The dummy species takes on the smallest nonzero value. Clarke et al. (2006) recommend only doing so when two sample units are empty for the same reason. Consider carefully whether this approach makes sense for you.

Value

A distance object of class 'dist'.

References

Clarke, K.R., P.J. Somerfield, and M.G. Chapman. 2006. On resemblance measures for ecological studies, including taxonomic dissim and a zero-adjusted Bray–Curtis coefficient for denuded assemblages. J Exp Marine Biol and Ecol 330:55–80.

Smith, R.J. 2017. Solutions for loss of information in high-beta-diversity community data. Methods in Ecology and Evolution 8(1): 68-74.

See Also

vegan's stepacross is a conceptual alternative and uses a dissimilarity matrix (not raw data).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
###   create data with several no-share SU pairs
set.seed(23)
Nspp <- Nsite <- 12
(x <- matrix(floor(rbeta((Nspp*Nsite), .2, 10)*100), Nspp, Nsite))
ecole::mx_diversity(x)   # high proportion of no-share SU pairs
d0 <- vegan::vegdist(x, 'bray')
d1 <- bray0(x)
op <- par(mfrow=c(1,3))
vegan::ordiplot(stats::cmdscale(d0), type='t')
vegan::ordiplot(stats::cmdscale(d1), type='t')
plot(d0,d1) ; abline(0,1) # zero-adj BC 'fans out' dissimilarities
par(op)

###   BC and zero-adj BC are ~same when no-share SUs are absent
x <- x+10
ecole::mx_diversity(x)   # zero no-share SU pairs
plot(vegan::vegdist(x, 'bray'), bray0(x)) ; abline(0,1)

###   test data from Table 1 of Clarke et al. (2006)
x <- matrix(c(0,0,1,1,0,1,0,0,10,10,0,0,
              0,0,0,0,1,0,0,5,0,20,0,50,
              0,0,0,0,0,1,0,5,0,20,0,50,
              0,0,0,0,0,0,2,0,10,0,50,100), nrow=12, ncol=4)
d0 <- vegan::vegdist(x, 'bray')
d1 <- bray0(x)
s  <- 2:12
# cf. 'B–C dissimilarity' in Table 1:
as.matrix(d0)[cbind(s,s-1)]
# cf. 'Zero-adjusted B–C' in Table 1:
as.matrix(d1)[cbind(s,s-1)]
# NMS ordinations using each dissimilarity matrix
#     cf. Fig. 1 in Clarke et al. (2006)
d0 <- as.dist(as.matrix(d0)[-c(1:2),-c(1:2)]) # rm depauperate sites
m0 <- vegan::metaMDS(d0, try=99)
m1 <- vegan::metaMDS(d1, try=99)
scr0 <- vegan::scores(m0)*(-1)  # simple reflection
scr1 <- vegan::scores(m1)*(-1)
op <- par(mfrow=c(1,2))
vegan::ordiplot(scr0, type='t')
vegan::ordiplot(scr1, type='t')
par(op)

phytomosaic/ecole documentation built on Jan. 2, 2022, 11:24 p.m.