sim.pat {simba} | R Documentation |
The function sim.pat
uses sima
to calculate compositional similarity between a focal sampling unit and all units in the data-set and simn
to calculate compositional similarity between a focal unit and its surrounding units. Surrounding can be specified as a radius or a ring. Significance can be tested.
sim.pat(veg, coord = NULL, dn, presabs = TRUE, test = TRUE, permutations = 100, ...) sima(veg, presabs = TRUE, d.inc = FALSE, ...) simn(veg, coord, dn, presabs = TRUE, d.inc = FALSE, ...)
veg |
A (species) matrix with rows representing plots/sampling units and columns representing species/variables. Up to now all values are transformed to presence/absence: all values > 0 are transformed to 1, all other values are 0. |
coord |
A two column data.frame defining the geographic positions of the sampling units. Should give (in this order) the x- and y-values in UTM or similar coordinates. Defaults to NULL. Triggers also if similarity to neighbours (when it is given) or to all units in the data-set (default) should be calculated. |
dn |
Neighbour definition. A positive numeric or a two value vector. In the first case it gives the distance from each sampling unit until which other sampling units should be seen as neighbours. In the second the two values define a ring around each plot. Plots which fall into the ring are considered as neighbors. See details. If coord is not given it becomes obsolete. |
presabs |
Triggers the calculation method. Should only the presence in the focal unit (FALSE) or also the absence in the focal unit (TRUE) be regarded? |
d.inc |
If species not occuring on the focal plot or its surroundings - but in the rest of the data-set should be considered, set it to TRUE. However, default behaviour is to do not. Note that when calling sim.pat without coordinates or sima this setting takes not effect unless there are non-occuring species in the matrix. |
test |
Should significance be tested? Defaults to true. See details. |
permutations |
If test=TRUE , how many permutations of the species matrix should be carried out? Defaults to 100. See details. |
... |
Further arguments to functions. |
The idea behind the function is the extension of available similarity measures by the possibility to calculate similarities between a focal unit and several other (surrounding) units at once whilst preserving species identities. In an equidistant grid one could also calculate the similarities between a focal unit and its six neighbours and then calculate a mean similarity value. However, this might be problematic as the values are based on the presence of different species. So the same similarity value can derive from a different set of species.
sim.pat
is different as it respects species identities of all included units at once. It has two modes. If a coordinate file and a neighbour definition is given it calculates the similarity between each unit and its surrounding units. Neighbours are all units which fall into the specified radius or ring of radiuses (dn
). On an equidistant grid the distance between grid units can simply be given if first hand neighbours shall be included, otherwise a ring has to be specified with a two value vector. If there is no coord
, dn
is obsolete. Then the similarity from each unit to all other units in the data-set is calculated.
The significance of the obtained similarity value can be tested in both cases. In the neighbour-case it is tested against a randomly rearranged species matrix veg
. For each permuted matrix, simn
is calculated for each unit and stored. The initial value is then tested against the resulting random values. If the initial value is lower than the mean of the permuted values (for each unit), the function looks at the lower end. If it is higher, the upper tail is tested. The test direction is given in the results file. Thus, for each unit it is known, whether the pattern is a deviation from random, if it is lower or higher than random, and if it is signifcantly different from random. In the all-case it is virtually the same but as a rearrangement of species on plots would change nothing, the function tests against an artificially produced data-set. This is done with ads
and the key parameters resemble the original species matrix veg
.
Returns a data.frame
with the similarity values calculated between the focal unit and its neighbours (sim2nbs
) or all other units in the data-set (sim2all
). In case of the first, the two first columns of the data.frame
give the number of species on the focal plot (n.spec
) and the number of neighbours (nbs
) to which similarity was calculated based on the neighbour definition (dn
).
If test = TRUE
the following columns are given in addition:
sim.test |
The p-value of the significance test. |
sig |
The significance decision, tested against alpha = 0.05. "*" means similarity value is significantly different from random. |
sig.prefix |
Marks against which tail significance was tested. If the initial similarity value is lower than the mean of the permuted values the lower tail is tested (sig.prefix = "-" ) and vice versa (sig.prefix = "+" ). |
Gerald Jurasinski terhorab@mac.com http://homepage.mac.com/terhorab/gerald/, Vroni Retzer vroni.retzer@uni-bayreuth.de
Jurasinski, G. & Retzer, V. in prep. Measuring multi-plot similarity with presence-absence data. Ecology in prep.
sim
from this package and the following functions of other packages for the calculation of similarities between two sites: vegdist
, dist.binary
,
dsvdis
, dist
.