[R-sig-Geo] inference of local Gi* using permutations

Jay Wang zw@ng3603 @end|ng |rom gm@||@com
Wed Mar 6 22:31:35 CET 2019


Hello,

I am currently using the localG () in spdep package, I was wondering if we
can have a conditional permutation-based inference to get the P value for
every Gi*. I saw that a Mote Carlo simulation is used in Moran.MC(), and I
borrowed the following codes from this function and tried to see if I can
do a permutation for localG():

pvals<-matrix(0, nrow = V, ncol = 1)
for (i in 1:V){
  rankresi<-rank(res[i, ])
  xranki <- rankresi[length(res[i, ])]
  diffi <- nsim - xranki
  diffi <- ifelse(diffi > 0, diffi, 0)
  pvali <- punif((diffi + 1)/(nsim + 1))
  pvals[i,]<-pvali
}

After running these codes with several different datasets, I found that all
the negative Gi*s have very high P values say 0.999 with 999 permutations,
meaning that there are no significant cold spots. Where is the problem? How
can we do conditional permutation-based inference for localG() with R
spdep? I understand the critics of permutation-based inference for local
indicators, but I just want to explore this. Thank you!

Best

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list