Description Usage Arguments Details Value Author(s) References See Also Examples
This function performs a multivariate autocorrelation test.
1 | multispati.randtest(dudi, listw, nrepet = 999)
|
dudi |
an object of class |
listw |
an object of class |
nrepet |
the number of permutations |
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)
Returns an object of class randtest
(randomization tests).
Daniel Chessel
S?bastien Ollier sebastien.ollier@u-psud.fr
Smouse, P. E. and Peakall, R. (1999) Spatial autocorrelation analysis of individual multiallele and multilocus genetic structure. Heredity, 82, 561–573.
1 2 3 4 5 6 7 8 | if (requireNamespace("maptools", quiet = TRUE) & requireNamespace("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)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.