Displaying 1 result from an estimated 1 matches for "t2nb".
Did you mean:
t2n
2005 Nov 17
1
Morans I for Spatial Surveillance
...rent time intervals for the detection of abnormal clusters. My code thus far is below - I would also like to assemble the results in a neat table if anyone has tips for this I would alo appreciate it as I am rather new to R!
Thanks
Serryn
T1<-read.dbf("ob.dbf")
N <- colnames(T1)
T2nb <- read.gal("PC.gal",override=TRUE)
col.W <- nb2listw(T2nb, style="W")
for(i in seq(N)) {
Vec1 <- spNamedVec(N[i+7], T1)
Svec1<-sum(Vec1)
ifelse ( Svec1> 0, res[i]<-moran.test(spNamedVec(N[i+7], T1), col.W, zero.policy=TRUE), res[i]<-&...