niche_overlap_index: Index of habitat niche overalp In cyrilmi/myfunctions: Rpackage cyril

Description

Derive an index (0: complete separation, 1: complete overlap) from a kselect object to estimate a degree of habitat niche overlap between species/indviduals

Usage

 1 niche_overlap_index(X, kernel = "gaussian", bw = "nrd0") 

Arguments

 X a kselect (adehabitatHS) object kernel a character string giving the smoothing kernel to be used. Default is "gaussian". See density() bw the smoothing bandwidth to be used to compute the kernel density. Default is "nrd0". See density() permutations logical, if permutations should be computed or not nb.permutations number of permutations to compute hypothesis the H0 to be tested: c("segregation","overlap")

Details

Uses scores obtained for each individual on each dimension of the ecological space of the Kselect and compute a non-parametric kernel estimation. Area of overlap between distribution of the two indviduals is calculated. Eigen values of the kslect are then used to calculated an overlap weihgted index.

O_{ij} = \int_{b}^{a} ≤ft [ f(x) - g(x) \right ]dx

\bar{O_{ij}} = \frac{∑_{e}^{n} O_{ij_{e}} λ _{e}}{∑_{e}^{n} λ _{e}}

i and j are the two individuals to be compared, f(x) and f(x) the two probability functions of indviduals i and j and e each of the axes.

Value

A list of paired matrices with an overlap index between each individuals calculated on each axis and a Weighted (based on eigen values of the kselect) overlap index calculated on all axes

Cyril Milleret

Examples

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 library(adehabitatHS) data(puechabonsp) locs <- puechabonsp$relocs map <- puechabonsp$map ## compute the home range of animals (e.g. using the minimum convex polygon) pc <- mcp(locs[,"Name"]) hr <- hr.rast(pc, map) ## Compute the number of relocation in each pixel of the map cp <- count.points(locs[,"Name"], map) ## prepares the data for the kselect analysis x <- prepksel(map, hr, cp) tab <- x$t ## We call a new graphic window ## A K-select analysis acp <- dudi.pca(tab, scannf = FALSE, nf = 4) kn <- kselect(acp, x$factor, x\$weight, scannf = FALSE, nf = 4) # compute habitat niche overlap niche_overlap_index(kn, kernel = "gaussian", bw = "nrd0",permutations=TRUE,nb.permutations=100,hypothesis="segregation") 

cyrilmi/myfunctions documentation built on May 12, 2017, 2:26 p.m.