Learn R Programming

adehabitat (version 1.1-1)

niche.test: Monte-Carlo Test on Parameters of the Ecological Niche

Description

niche.test tests for the significance of two parameters of the ecological niche of a species (marginality and tolerance), using Monte-Carlo methods. This is a bivariate test.

Usage

niche.test(kasc, points, nrep = 999, h, o.include = FALSE,
           colZ = "blue", colS = "orange", ...)

Arguments

kasc
a raster map of class kasc
points
a data frame with two columns, giving the coordinates of the species locations
nrep
the number of permutations
h
vector of bandwidths for x and y directions passed to biv.test, used in the function kde2d of the package MASS. Defaults to normal reference bandwidth (see ?kde2d).
o.include
logical, passed to biv.test. If TRUE, the origin is included in the plot
colZ
a color passed to biv.test for the color of the kernel density estimation of the randomized values
colS
a color passed to biv.test for the actual values of marginality and tolerance of the object of class enfa
...
further arguments passed to or from other methods

Value

  • Returns a list containing the following components:
  • dfxya data frame with the randomized values of marginality (first column) and tolerance (second column).
  • obsthe actual value of marginality and tolerance.

Warning

biv.test uses the function kde2d of the package MASS.

Details

niche.test tests the significance of two parameters describing the ecological niche: the marginality (squared length of the vector linking the average available habitat conditions to the average used habitat conditions in the ecological space defined by the habitat variables), and the tolerance (inertia of the niche in the ecological space, i.e. the sum over all variables of the variance of used pixels). At each step of the randomisation procedure, the test randomly allocates the n points in the pixels of the map. The marginality and the tolerance are then recomputed on this randomised data set. Actual values are compared to random values with the help of the function biv.test.

See Also

biv.test for more details on bivariate tests.

Examples

Run this code
data(lynxjura)

## We keep only "wild" indices.
tmp=lynxjura$loc[,4]!="D"
if (require(MASS))
   niche=niche.test(lynxjura$map,
                    lynxjura$locs[tmp, c("X", "Y")])

Run the code above in your browser using DataLab