adespatial (version 0.0-7)

multispati: Multivariate spatial analysis


This function provides a multivariate extension of the univariate method of spatial autocorrelation analysis. It provides a spatial ordination by maximizing the product of variance by spatial autocorrelation.


multispati(dudi, listw, scannf = TRUE, nfposi = 2, nfnega = 0)
"summary"(object, ...)
"print"(x, ...)
"plot"(x, xax = 1, yax = 2, pos = -1, storeData = TRUE, plot = TRUE, ...)


an object of class dudi obtained by the simple analysis of a data table
an object of class listw created for example by nb2listw
a logical value indicating whether the eigenvalues barplot should be displayed
an integer indicating the number of axes with positive autocorrelation
an integer indicating the number of axes with negative autocorrelation
x, object
an object of class multispati
xax, yax
the numbers of the x-axis and the y-axis
an integer indicating the position of the environment where the data are stored, relative to the environment where the function is called. Useful only if storeData is FALSE
a logical indicating if the data should be stored in the returned object. If FALSE, only the names of the data arguments are stored
a logical indicating if the graphics is displayed
further arguments passed to or from other methods


Returns an object of class multispati, which contains the following elements : following elements :


This analysis generalizes the Wartenberg's multivariate spatial correlation analysis to various duality diagrams created by the functions (dudi.pca, dudi.coa, dudi.acm, dudi.mix...) If dudi is a duality diagram created by the function dudi.pca and listw gives spatial weights created by a row normalized coding scheme, the analysis is equivalent to Wartenberg's analysis.

We note X the data frame with the variables, Q the column weights matrix and D the row weights matrix associated to the duality diagram dudi. We note L the neighbouring weights matrix associated to listw. Then, the 'multispati' analysis gives principal axes v that maximize the product of spatial autocorrelation and inertia of row scores : $$I(XQv)*\|XQv\|^2 = v^{t}Q^{t}X^{t}DLXQv$$


Dray, S., Said, S. and Debias, F. (2008) Spatial ordination of vegetation data using a generalization of Wartenberg's multivariate spatial correlation. Journal of vegetation science, 19, 45--56.

Grunsky, E. C. and Agterberg, F. P. (1988) Spatial and multivariate analysis of geochemical data from metavolcanic rocks in the Ben Nevis area, Ontario. Mathematical Geology, 20, 825--861.

Switzer, P. and Green, A.A. (1984) Min/max autocorrelation factors for multivariate spatial imagery. Tech. rep. 6, Stanford University.

Thioulouse, J., Chessel, D. and Champely, S. (1995) Multivariate analysis of spatial patterns: a unified approach to local and global structures. Environmental and Ecological Statistics, 2, 1--14.

Wartenberg, D. E. (1985) Multivariate spatial correlation: a method for exploratory geographical analysis. Geographical Analysis, 17, 263--283.

Jombart, T., Devillard, S., Dufour, A.-B. and Pontier, D. A spatially explicit multivariate method to disentangle global and local patterns of genetic variability. Submitted to Genetics.

See Also



Run this code

if (require(spdep, quiet = TRUE) & require(ade4, quiet = TRUE)) {
    maf.xy <- mafragh$xy
    maf.flo <- mafragh$flo
    maf.listw <- nb2listw(mafragh$nb)
    if(adegraphicsLoaded()) {
      g1 <- s.label(maf.xy, nb = mafragh$nb, plab.cex = 0.75)
    } else {
      s.label(maf.xy, neig = mafragh$neig, clab = 0.75)
    maf.coa <- dudi.coa(maf.flo,scannf = FALSE) <- multispati(maf.coa, maf.listw, scannf = FALSE, nfposi = 2, nfnega = 2)
    ### detail eigenvalues components
    fgraph <- function(obj){
      # use multispati summary
      sum.obj <- summary(obj)
      # compute Imin and Imax
      Ibounds <- moran.bounds(eval(as.list(obj$call)$listw))
      Imin <- Ibounds[1]
      Imax <- Ibounds[2]
      I0 <- -1/(nrow(obj$li)-1)
      # create labels
      labels <- lapply(1:length(obj$eig),function(i) bquote(lambda[.(i)]))
      # draw the plot
      xmax <- eval(as.list(obj$call)$dudi)$eig[1]*1.1
      var <- sum.obj[,2]
      moran <- sum.obj[,3]
      plot(x=var,y=moran,type='n',xlab='Inertia',ylab="Spatial autocorrelation (I)",
      ytick <- c(I0,round(seq(Imin,Imax,le=5),1))
      ytlab <- as.character(round(seq(Imin,Imax,le=5),1))
      ytlab <- c(as.character(round(I0,1)),as.character(round(Imin,1)),
      title("Spatial and inertia components of the eigenvalues")
    ## end eigenvalues details

    if(adegraphicsLoaded()) {
      g2 <- s1d.barchart(maf.coa$eig, p1d.hori = FALSE, plot = FALSE)
      g3 <- s1d.barchart($eig, p1d.hori = FALSE, plot = FALSE) 
      g4 <- s.corcircle($as, plot = FALSE)
      G1 <- ADEgS(list(g2, g3, g4), layout = c(1, 3))
    } else {
      par(mfrow = c(1, 3))
      par(mfrow = c(1, 1))
    if(adegraphicsLoaded()) {
      g5 <- s.value(maf.xy, -maf.coa$li[, 1], plot = FALSE)
      g6 <- s.value(maf.xy, -maf.coa$li[, 2], plot = FALSE)
      g7 <- s.value(maf.xy,$li[, 1], plot = FALSE)
      g8 <- s.value(maf.xy,$li[, 2], plot = FALSE)
      G2 <- ADEgS(list(g5, g6, g7, g8), layout = c(2, 2))
    } else {
      par(mfrow = c(2, 2))
      s.value(maf.xy, -maf.coa$li[, 1])
      s.value(maf.xy, -maf.coa$li[, 2])
      s.value(maf.xy,$li[, 1])
      s.value(maf.xy,$li[, 2])
      par(mfrow = c(1, 1))

    w1 <- -maf.coa$li[, 1:2]
    w1m <- apply(w1, 2, lag.listw, x = maf.listw) <-$li[, 1:2]
    w1.msm <- apply(, 2, lag.listw, x = maf.listw)
    if(adegraphicsLoaded()) {
      g9 <- s.match(w1, w1m, plab.cex = 0.75, plot = FALSE)
      g10 <- s.match(, w1.msm, plab.cex = 0.75, plot = FALSE)
      G3 <- cbindADEg(g9, g10, plot = TRUE)
    } else {
      par(mfrow = c(1,2))
      s.match(w1, w1m, clab = 0.75)
      s.match(, w1.msm, clab = 0.75)
      par(mfrow = c(1, 1))

    maf.pca <- dudi.pca(mafragh$env, scannf = FALSE)
    multispati.randtest(maf.pca, maf.listw) <- multispati(maf.pca, maf.listw, scannf=FALSE)

Run the code above in your browser using DataLab