data(oldcol)
sim1 <- moran.mc(spNamedVec("CRIME", COL.OLD), nb2listw(COL.nb, style="W"),
nsim=99)
mean(sim1$res)
var(sim1$res)
summary(sim1$res)
colold.lags <- nblag(COL.nb, 3)
sim2 <- moran.mc(spNamedVec("CRIME", COL.OLD), nb2listw(colold.lags[[2]],
style="W"), nsim=99)
summary(sim2$res)
sim3 <- moran.mc(spNamedVec("CRIME", COL.OLD), nb2listw(colold.lags[[3]],
style="W"), nsim=99)
summary(sim3$res)
Run the code above in your browser using DataLab