The calculation of Moran's I involves several steps:
Define the spatial weights matrix, which represents the spatial relationships among different locations. Compute the mean of the variable of interest (e.g., disease incidence). Calculate the difference between each observation and the mean. Multiply these differences by the spatial weights and sum them to get the numerator. The denominator is the sum of squared differences from the mean. Finally, Moran's I is obtained by normalizing the numerator by the denominator and the number of observations.
Mathematically, Moran's I is represented as: I = (N / W) * (Σi Σj Wij (xi - x̄)(xj - x̄) / Σi (xi - x̄)^2) where N is the number of observations, W is the sum of all spatial weights, Wij is the spatial weight between observations i and j, and xi and xj are the values of the variable at locations i and j, respectively.