multispati.randtest {ade4}R Documentation

Multivariate spatial autocorrelation test (in C)

Description

This function performs a multivariate autocorrelation test.

Usage

multispati.randtest(dudi, listw, nrepet = 999)

Arguments

dudi an object of class dudi for the duality diagram analysis
listw an object of class listw for the spatial dependence of data observations
nrepet the number of permutations

Details

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. This function performs a Monte-Carlo Test on the multivariate spatial autocorrelation index :

r = trace(t(X)DLXQ) / trace(t(X)DXQ)

Value

Returns an object of class randtest (randomization tests).

Author(s)

Daniel Chessel
S├ębastien Ollier ollier@biomserv.univ-lyon1.fr

References

Smouse, P. E. and Peakall, R. (1999) Spatial autocorrelation analysis of individual multiallele and multilocus genetic structure. Heredity, 82, 561–573.

See Also

dudi,mat2listw

Examples

if (require(maptools, quiet = TRUE) & require(spdep, quiet = TRUE)) {
    data(mafragh)
    maf.listw <- nb2listw(neig2nb(mafragh$neig))
    maf.pca <- dudi.pca(mafragh$mil, scannf = FALSE)
    multispati.randtest(maf.pca, maf.listw)
    maf.pca.ms <- multispati(maf.pca, maf.listw, scannf=FALSE)
    plot(maf.pca.ms)
}

Worked out examples


> library(ade4)
> ### Name: multispati.randtest
> ### Title: Multivariate spatial autocorrelation test (in C)
> ### Aliases: multispati.randtest
> ### Keywords: multivariate spatial nonparametric
> 
> ### ** Examples
> 
> if (require(maptools, quiet = TRUE) & require(spdep, quiet = TRUE)) {
+     data(mafragh)
+     maf.listw <- nb2listw(neig2nb(mafragh$neig))
+     maf.pca <- dudi.pca(mafragh$mil, scannf = FALSE)
+     multispati.randtest(maf.pca, maf.listw)
+     maf.pca.ms <- multispati(maf.pca, maf.listw, scannf=FALSE)
+     plot(maf.pca.ms)
+ }
deldir 0.0-12 

     Please note: The process for determining duplicated points
     has changed from that used in version 0.0-9 (and previously).

> 
> 
> 
> 

[Package ade4 Index]