Dear all, I am looking at the example in spdep for autocorrelation test as below. However, how can one create a nb object for your data? Suppose you have data COL.OLD. But how do you create COL.nb from there? Many thanks for your help! Bill ####################################################### library(spdep) data(oldcol) dim(COL.OLD) head(COL.OLD) geary.test(COL.OLD$CRIME, nb2listw(COL.nb, style="W")) geary.test(COL.OLD$CRIME, nb2listw(COL.nb, style="W"), randomisation=FALSE)