Learn R Programming

adehabitat (version 1.1-1)

enfa: Ecological-Niche Factor Analysis

Description

enfa performs an Ecological-Niche Factor Analysis. hist.enfa draws histograms of the row scores or of the initial variables of the ENFA.

Usage

enfa(kasc, pts, scannf = TRUE, nf = 1)
hist.enfa(x, scores = TRUE, type = c("h", "l"),
          adjust = 1, colZ = "blue", colS = "orange", ...)

Arguments

kasc
a raster map of class kasc
pts
a data frame with two columns, giving the coordinates of the species locations
scannf
logical. Whether the eigenvalues bar plot should be displayed
nf
if scannf = FALSE, an integer indicating the number of kept specialization axes
x
an object of class enfa
scores
logical. If TRUE, the histograms display the row scores of the ENFA. If FALSE, they display the environmental variables (in this case, this is equivalent to histniche)
type
what type of plot should be drawn. Possible types are: * "h" for histograms, * "l" for kernel density estimates (see ?density). By default, type = "h" is used. If type = "l" is used,
adjust
if type = "l", a parameter used to control the bandwidth of the density estimates (see ?density)
colZ
color for the histograms of the available pixels
colS
color for the histograms of the used pixels
...
further arguments passed to or from other methods

Value

  • enfa returns a list of class enfa containing the following components:
  • calloriginal call.
  • taba data frame with n rows and p columns.
  • pra vector of length n containing the number of points in each pixel of the map.
  • nfthe number of kept specialization axes.
  • mthe marginality (squared length of the marginality vector).
  • sa vector with all the eigenvalues of the analysis.
  • lwrow weights, a vector with n components.
  • lirow coordinates, data frame with n rows and nf columns.
  • l1row normed scores, data frame with n rows and nf columns.
  • cocolumn coordinates, data frame with p rows and nf columns.
  • c1column normed scores, data frame with p rows and nf columns.
  • indexan integer vector giving the position of the rows of tab in the initial object of class kasc.
  • attran object of class mapattr with the attributes of the initial kasc.

Details

The niche concept, as defined by Hutchinson (1957), considers the ecological niche of a species as an hypervolume in the multidimensional space defined by environmental variables, within which the populations of a species can persist. The Ecological-Niche Factor Analysis (ENFA) has been developped by Hirzel et al. (2002) to analyse the position of the niche in the ecological space. Nicolas Perrin (1984) described the position of the niche in the n-dimensional space using two measures: the M-specialization (hereafter termed marginality) and the S-specialization (hereafter termed specialization). The marginality represents the squared distance of the niche barycentre from the mean available habitat. A large specialization corresponds to a narrow niche relative to the habitat conditions available to the species. The ENFA first extracts an axis of marginality (vector from the average of available habitat conditions to the average used habitat conditions). Then the analysis extracts successives orthogonal axes (i.e. uncorrelated), which maximises the specialization of the species. The calculations used in the function are described in Hirzel et al. (2002).

References

Hutchinson, G.E. (1957) Concluding Remarks. Cold Spring Harbor Symposium on Quantitative Biology, 22: 415--427. Perrin, N. (1984) Contribution � l'�cologie du genre Cepaea (Gastropoda) : Approche descriptive et exp�rimentale de l'habitat et de la niche �cologique. Th�se de Doctorat. Universit� de Lausanne, Lausanne. Hirzel, A.H., Hausser, J., Chessel, D. & Perrin, N. (2002) Ecological-niche factor analysis: How to compute habitat-suitability maps without absence data? Ecology, 83, 2027--2036.

See Also

niche, kselect for other types of analysis of the niche, when several species are under studies, niche.test to perform a test of the marginality and the tolerance of the niche, and scatter.enfa to have a graphical display of objects of class enfa.

Examples

Run this code
data(lynxjura)

map <- lynxjura$map

## We keep only "wild" indices.
tmp <- lynxjura$locs[,4]!="D"
locs <- lynxjura$locs[tmp, c("X","Y")]
hist(map, type = "l")
## The variable artif is far from symetric

## We perform a square root transformation
## of this variable
## We therefore normalize the variable 'artif'
map[,4] <- sqrt(map[,4])
hist(map, type = "l")

## We perform the ENFA
(enfa1 <- enfa(map, locs[tmp, c("X","Y")],
               scannf = FALSE))
hist(enfa1)
hist(enfa1, scores = FALSE, type = "l")

## randomization test
(renfa <- randtest(enfa1))
plot(renfa)
if (require(MASS))
   scatter(enfa1)

Run the code above in your browser using DataLab