The Cochran-Armitage trend test under spatial autocorrelation