dunnfa  R Documentation 
dunnfa
performs a factorial decomposition of the Mahalanobis
distances in habitat selection studies (see details).
dunnfa(dudi, pr, scannf = TRUE, nf = 2) ## S3 method for class 'dunnfa' print(x, ...)
dudi 
an object of class 
pr 
a vector giving the utilization weights associated to each unit 
scannf 
logical. Whether the eigenvalues barplot should be displayed 
nf 
an integer indicating the number of kept axes 
x 
an object of class 
... 
additional arguments to be passed to the function

This analysis is in essence very similar to the MADIFA (see
?madifa
). The Mahalanobis distances are often used in the
context of nicheenvironment studies (Clark et al. 1993, see the
function mahasuhab
). Each resource unit takes a value on a
set of environmental variables. Each environmental variable defines a
dimension in a multidimensionnal space, namely the ecological space.
A set of points (resource units) describes what is available to the
species. For each point, a "utilization weight" measures the
intensity of use of the point by the species. The set of points for
which the utilization weight is greater than zero defines the
"niche". The Mahalanobis distance between any resource unit in this
space (e.g. the point defined by the values of environmental variables
in a pixel of a raster map) and the centroid of the niche (the
distribution of used resource units) can be used to give a value of
eccentricity to this point.
For a given distribution of available resource units, for which a
measure of Mahalanobis distances is desired, the MADIFA (MAhalanobis
DIstances Factor Analysis) partitions the ecological space into a set
of axes, so that the first axes maximises the average proportion of
their squared Mahalanobis distances. James Dunn (formerly University
of Arkansas) proposed the analysis programmed in the function
dunnfa
, as an alternative to the MADIFA (unpublished
results). This analysis is closely related to both the ENFA
(Ecological niche factor analysis, Hirzel et al. 2002) and the
MADIFA.
The analysis proposed by James Dunn searches, in the multidimensional space defined by environmental variables, synthesis variables which maximise the ratio (variance of the scores of available resource units) / (variance of the scores of used resource units). This ratio is sometimes called "specialization" in the ecological literature (Hirzel et al. 2002). It is therefore very similar to the ENFA (which also maximises the specialization), except that the factorial axes returned by this analysis are not required to be *orthogonal to the marginality axis*.
James Dunn demonstrated that this analysis also partitions the Mahalanobis distances into uncorrelated axes, which makes it similar to the MADIFA (the difference is that the MADIFA maximises the mean squared Mahalanobis distances on the first axes, whereas the DUNNFA maximises the specialization on the first axes). Therefore, as for the MADIFA, the DUNNFA can be used to build reduced rank habitat suitability map.
Note that although this analysis could theoretically be used with all kinds of variables, it it currently implemented only for numeric variables.
dunnfa
returns a list of class dunnfa
containing the
following components:
call 
original call. 
tab 
a data frame with n rows and p columns (original data frame centered by column for the uniform weighting). 
pr 
a vector of length n containing the number of points in each pixel of the map. 
nf 
the number of kept axes. 
eig 
a vector with all the eigenvalues of the analysis. 
liA 
row coordinates (centering on the centroid of the cloud of available points), data frame with n rows and nf columns. 
liU 
row coordinates (centering on the centroid of the cloud of available points), data frame with p rows and nf columns. 
mahasu 
a vector of length n containing the reducedrank squared Mahalanobis distances for the n units. 
co 
column (environmental variables) coordinates, a data frame with p rows and nf columns 
cor 
the correlation between the DUNNFA axes and the original variable 
This analysis was developed by James Dunn during an email discussion on the MADIFA, and is still unpublished work. Implemented in adehabitatHS with his autorization.
Clement Calenge clement.calenge@ofb.gouv.fr
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) Ecologicalniche factor analysis: How to compute habitatsuitability maps without absence data? Ecology, 83, 2027–2036.
Calenge, C., Darmon, G., Basille, M., Loison, A. and Jullien
J.M. (2008) The factorial decomposition of the Mahalanobis distances
in habitat selection studies. Ecology, 89, 555–566.
madifa
, enfa
and
gnesfa
for related methods. mahasuhab
for
details about the Mahalanobis distances.
## Not run: data(bauges) map < bauges$map locs < bauges$loc ## We prepare the data for the analysis tab < slot(map, "data") pr < slot(count.points(locs, map), "data")[,1] ## We then perform the PCA before the analysis pc < dudi.pca(tab, scannf = FALSE) (dun < dunnfa(pc, pr, nf=2, scannf = FALSE)) ## We should keep one axis: barplot(dun$eig) ## The correlation of the variables with the first two axes: s.arrow(dun$cor) ## A factorial map of the niche (centering on the available points) scatterniche(dun$liA, dun$pr, pts=TRUE) ## a map of the reduced rank Mahalanobis distances ## (here, with one axis) dun2 < dunnfa(pc, pr, nf=1, scannf = FALSE) df < data.frame(MD=dun2$mahasu) coordinates(df) < coordinates(map) gridded(df) < TRUE image(df) ## Compute the specialization on the row scores of ## the analysis: apply(dun$liA, 2, function(x) { varav < sum((x  mean(x))^2) / length(x) meanus < sum(dun$pr*x)/sum(dun$pr) varus < sum(dun$pr * (x  meanus )^2)/sum(dun$pr) return(varav/varus) }) ## The eigenvalues: dun$eig ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.