Learn R Programming

simba (version 0.3-4)

com.sim: Compare mean similarity between subsets of data

Description

Related to mrpp. Are the differences in mean similarity between data subsets significant? Function takes the whole data-set (species matrix) and a subsetting vector and computes a specified similarity between all sampling units (rows). Then subsets are compared regarding their mean similarity. Statistical inference is obtained through permutation.

Usage

com.sim(veg, subs, simil = "soerensen", binary = TRUE, 
    permutations = 1000, alpha = 0.05, bonfc = TRUE, ...)

Arguments

veg
Species matrix with columns = sites, rows = species. Deliver presence/absence data or abundance data. However, binary has to be set accordingly.
subs
Vector containing the subset definition. Same entries are understood to indicate belonging to the same subset (can be characters, factors or numerics). For each subset similarities/distances are calculated. Then all subsets are compared regarding mean and
simil
Sets the coefficient to be used for calculating similarities/distances. If binary = TRUE, see sim, otherwise see vegdist for possible choi
binary
Changes the function used for the calculation of similarity/distance. If binary species data ist provided in veg keep the default (binary = TRUE). In this case sim is used to calc
permutations
Number of permutations performed to obtain the statistical inference. See Details.
alpha
Initial alpha level to test against. Defaults to 0.05.
bonfc
Shall Bonferroni correction be applied? Defaults to true.
...
Further arguments to functions.

Value

  • Returns an object of class cslist containing the call to the function, the used method for similarity/distance calculation, a comparison matrix showing the connections between data-subsets (rows and columns connected with "*" are significantly different), the number of subsets involved, the number of permutations and a matrix giving information about the following components for each comparison between subsets:
  • XSubset identifier for one of the compared subsets
  • YSubset identifier for the other compared subset
  • mean.xAverage distance/similarity for subset X.
  • mean.yAverage distance/similarity for subset Y.
  • diffDifference in average distance/similarity for this comparison
  • sigSignificance of the difference in mean of the similarities.
  • sigsSignificance flag for the comparison ("*" means significant differences, "ns" means that the differences are not significant).
  • FvalF-value for the Comparison.
  • sigFIs F significant?
  • sigsFSignificance flag for F.

encoding

UTF-8

Details

Entries of similarity/distance matrices are not independent. Therefore normal statistics might fail. One possibility is the application of permutation procedures. This means that the statistical distribution against which significance is tested is derived from the data. Here it is implemented as follows: For each subset the similarities/distances between all sites (plots) are calculated with the specified coefficient. Then the resulting similarity/distance matrices are compared with diffmean. This is done for the comparison of each subset with each other subset. If specified (defaults to TRUE), Bonferroni correction is applied (to correct for multiple testing). Depending on the number of subsets and the number of sites per subset it may take some seconds to be computed.

See Also

mrpp for an anova like approach for comparing the differences of species data subsets.

Examples

Run this code
data(abis)

## see environmental data (see documentation on data for details)
abis.env

## calculate the difference in similarities for the three major  
## vegetation types
## therefore create a vector from the data expressing belonging
## to the vegetation types:
tcs.sub <- rep(0, 61)
tcs.sub[abis.env[,29]==1] <- 1
tcs.sub[abis.env[,30]==1] <- 2
tcs.sub[abis.env[,31]==1] <- 3

## calulate differences with Bray-Curtis as the distance measure
com.sim(abis.spec, tcs.sub, simil="bray", binary=FALSE)

## calculate differences with Soerensen as the similarity measure
com.sim(abis.spec, tcs.sub)

Run the code above in your browser using DataLab