multispati.rtest {ade4} | R Documentation |
This function performs a multivariate autocorrelation test.
multispati.rtest(dudi, listw, nrepet = 99)
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 |
We note X the data frame with the variables, Q the column weight matrix and D the row weight 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 = t(X)DLXQ / t(X)DXQ
Returns an object of class randtest
(randomization tests).
Daniel Chessel chessel@biomserv.univ-lyon1.fr
Sébastien Ollier ollier@biomserv.univ-lyon1.fr
Smouse, P. E. and Peakall, R. (1999) Spatial autocorrelation analysis of individual multiallele and multilocus genetic structure. Heredity, 82, 561–573.
if(require(spdep, quiet = TRUE)){ data(mafragh) maf.xy <- mafragh$xy maf.flo <- mafragh$flo maf.listw <- nb2listw(neig2nb(mafragh$neig)) s.label(maf.xy, neig = mafragh$neig, clab = 0.75) maf.coa <- dudi.coa(maf.flo, scannf = FALSE) multispati.rtest(maf.coa, maf.listw) }