Calculate species association between each pair of species.
sp.pair(matr)
chi square matrix
chi square matrix information
V
Value indicating species association is positive or negative
Ochiai's index
Dice's index
Jaccard's index
Pearson's correlation
Spearman's rank correlation
Point correlation coefficient
Association coefficient
Standard species matrix, with rows for plots and columns for species.
Jinlong Zhang jinlongzhang01@gmail.com
Assume we have speciesA and speciesB, a
, b
, c
, d
that corresponding to the co-occurrence could be used to conduct the species association analysis between the two species.
a
= number of plots both occupied by speciesA and speciesB.
b
= number of plots only found speciesA.
c
= number of plots only found speciesB.
d
= number of plots without speciesA or speciesB.
N
= a+b+c+d
This function are using the following formula:
Chi square (Yate's correction):
chi^{2}=((((a*d-b*c)-0.5*N)^2)*N)/(a+b)*(a+c)*(b+d)*(c+d)
V ratio:
V = ((a+d)-(b+c))/(a + b + c + d)
Jaccard index:
Jaccard =a/(a + b + c)
Ochiai index:
Ochiai = a/sqrt((a+b)*(a+c))
Dice index:
Dice = 2*a/(2*a + b + c)
The Association Coefficient(AC
):
if a*d>= b*c
:
AC = (a*d - b*c)/((a+b)*(b+d))
if b*c>= a*d and d>=a
:
AC=(a*d - b*c)/((a+b)*(a+c))
if b*c>a*d and a<a
:
AC = (a*d - b*c/((b+d)(d+c))
Point correlation coefficient
(PCC
):
PCC = {a*d-b*c}/{(a+b)*(a+c)*(c+d)*(b+d)}
Zhang Qiaoying, Peng Shaolin, Zhang Sumei, Zhang Yunchun, Hou Yuping.(2008). Association of dormintant species in Guia hill Municipal Park of Macao. Ecology and Environment. 17:1541-1547
Zhou XY, Wang BS, Li MG, Zan QJ.(2000). An analysis of interspecific associations in secondary succession forest communities in Heishiding Nature Reserve, Guangdong Province. Acta Phytoecologica Sinica. 24:332-339.
JIAN Minfei, LIU qijing, ZHU du, YOU hai.(2009). Inter-specific correlations among dorminant populations of tree layer species in evergreen broad-leaved forest in Jiulianshan Mountain of subtropical China. Chinese Journal of Plant Ecology. 33: 672-680
See Also as sp.assoc
for species association for total species.
data(testdata)
spmatrix <- data2mat(testdata)
result <- sp.pair(spmatrix)
Run the code above in your browser using DataLab