predict.enfa: Habitat Suitability Maps Built from the ENFA

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

predict.enfa computes habitat suitability maps using the Ecological-Niche Factor Analysis and the Mahalanobis distances method.

Usage

1
2
## S3 method for class 'enfa'
predict(object, index, attr, nf, ...)

Arguments

object

an object of class enfa

index

an integer vector giving the position of the rows of tab in the initial object of class kasc.

attr

an object of class kasc or mapattr.

nf

the number of axes of specialization kept for the predictions. By default, all axes kept in object are used

...

further arguments passed to or from other methods

Details

The predictions are based on the position of the niche defined by the ENFA within the multidimensional space of environmental variables. The ENFA produces row coordinates for each pixel, which are used with the function mahalanobis. For each pixel, this function computes the Mahalanobis distances from the barycentre of the niche.

Actually, the function predict.enfa is identical to the function mahasuhab, except that the habitat suitability map is computed using the axes of the ENFA, instead of the raw data.

Note that the MADIFA allows a more consistent factorial decomposition of the Mahalanobis distances.

Value

Returns a raster map of class kasc.

Author(s)

Mathieu Basille basille@ase-research.org

References

Clark, J.D., Dunn, J.E. and Smith, K.G. (1993) A multivariate model of female black bear habitat use for a geographic information system. Journal of Wildlife Management, 57, 519–526.

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

mahalanobis for information on the computation of Mahalanobis distances. mahasuhab for more details on the computation of habitat suitability maps using the Mahalanobis distances. madifa for a more consistent factorial decomposition of the Mahalanobis distances

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Not run: 
data(lynxjura)

map <- lynxjura$map

## We keep only "wild" indices.
tmp <- lynxjura$loc[,4] != "D"
locs <- lynxjura$locs[tmp, c("X","Y")]
dataenfa1 <- data2enfa(map, locs)

(enfa1 <- enfa(dudi.pca(dataenfa1$tab, scannf=FALSE),
               dataenfa1$pr, scannf = FALSE))

## Compute the prediction
pred <- predict(enfa1, dataenfa1$index, dataenfa1$attr)
image(pred)
contour(pred, col="green", add=T)
points(locs, col = "red", pch = 16)
## Lighter areas are the most preferred areas

## End(Not run)

Example output

Loading required package: ade4
Loading required package: tkrplot
Loading required package: tcltk
Loading required package: shapefiles
Loading required package: foreign

Attaching package: 'shapefiles'

The following objects are masked from 'package:foreign':

    read.dbf, write.dbf

Loading required package: sp

************************************************
************************************************
THE PACKAGE adehabitat IS NOW DEPRECATED!!!!!!!
 It is dangerous to use it, as bugs will no longer be corrected.
It is now recommended to use the packages adehabitatMA, adehabitatLT, adehabitatHR, and adehabitatHS.
These 4 packages are the future of adehabitat.
 They have a vignette explaining in detail how they can be used.
They implement more methods than adehabitat
They are based on the more common and more clever spatial classes implemented in sp.
Bugs are corrected frequently.
Really, avoid to use the classical adehabitat, unless you have a very good reason for it.

*****THIS IS THE VERY LAST WARNING*****
 This is the last version of adehabitat submitted to CRAN (at the time of writing: 2015-03-27).
 THE NEXT VERSION OF adehabitat WILL JUST BE A VIRTUAL PACKAGE LOADING ALL THE PACKAGES DESCRIBED ABOVE.

Warning messages:
1: no DISPLAY variable so Tk is not available 
2: loading Rplot failed 
ENFA
$call: enfa(dudi = dudi.pca(dataenfa1$tab, scannf = FALSE), pr = dataenfa1$pr, 
    scannf = FALSE)

marginality: 0.1318
eigen values of specialization: 1.561 1.198 1.036
$nf: 1 axis of specialization saved

  vector length mode    content                              
1 $pr    8640   numeric vector of presence                   
2 $lw    8640   numeric row weights                          
3 $cw    4      numeric column weights                       
4 $mar   4      numeric coordinates of the marginality vector
5 $s     3      numeric eigen values of specialization       

  data.frame nrow ncol content           
1 $tab       8640 4    modified array    
2 $li        8640 2    row coordinates   
3 $co        4    2    column coordinates
Warning message:
In predict.enfa(enfa1, dataenfa1$index, dataenfa1$attr) :
  the enfa is not mathematically optimal for prediction:
 please consider the madifa instead

adehabitat documentation built on Jan. 28, 2018, 5:02 p.m.