Testing for spatial autocorrelation in ecological studies