
global.rtest(X, listw, k = 1, nperm = 499)
local.rtest(X, listw, k = 1, nperm = 499)
listw
. Can be obtained
easily using the function chooseCN
.randtest
.chooseCN
, spca
, monmonier
data(sim2pop)
if(require(spdep)){
cn <- chooseCN(sim2pop@other$xy,ask=FALSE,type=1,plot=FALSE,res="listw")
# global test
Gtest <- global.rtest(sim2pop@tab,cn)
Gtest
# local test
Ltest <- local.rtest(sim2pop@tab,cn)
Ltest
}
Run the code above in your browser using DataLab