phi {optpart} | R Documentation |
Calculating the phi Statistic on Taxon Classifications
Description
Calculates the phi
statistic on a classified
table of taxa
Usage
phi(comm,clustering,minplt=10,p.adjust=FALSE)
Arguments
comm |
a data.frame with samples as rows and attributes as columns |
clustering |
a vector of integers or an object of class ‘clustering’, ‘partition’, or ‘partana’ |
minplt |
the minimum number of samples a species must occur in to be included in the calculation |
p.adjust |
switch to control adjusting probabilities for simultaneous inference by Hochberg correction |
Details
phi
is a statistic of agreement between two vectors. In this case
the function calculates the distribution of each species within clusters of a partition,
calculates the phi
statistic for each species in each cluster.
\phi = \frac{ad - bc}{\sqrt{(a+b)\times(c+d)\times(a+c)\times(b+c)}}
where:
a | sample is in specified type and species is present |
b | sample is not in group and species is present |
c | sample is in type but species is not present |
d | sample is not in type and species is not present |
Value
A data.frame of \phi
values with species as rows and clusters as columns
Author(s)
David W. Roberts droberts@montana.edu
References
Tichy, L. and M. Chytry. 2006. Statistical determination of diagnostic species for site groups of unequal size. Journal of Vegetation Science 17:809-818.
Examples
data(shoshveg)
dis.bc <- dsvdis(shoshveg,'bray')
opt.5 <- optpart(5,dis.bc)
phi(shoshveg,opt.5)