## Figures

## Abstract

### Background

Spatial complexity is always associated with spatial autocorrelation. Spatial autocorrelation coefficients including Moran’s index proved to be an eigenvalue of the spatial correlation matrixes. An eigenvalue represents a kind of characteristic length for quantitative analysis. However, if a spatial correlation process is based on self-organized evolution, complex structure, and the distributions without characteristic scale, the eigenvalue will be ineffective. In this case, a scaling exponent such as fractal dimension can be used to compensate for the shortcoming of characteristic length parameters such as Moran’s index.

### Method

This paper is devoted to finding an intrinsic relationship between Moran’s index and fractal dimension by means of spatial correlation modeling. Using relative step function as spatial contiguity function, we can convert spatial autocorrelation coefficients into spatial autocorrelation functions.

### Result

By decomposition of spatial autocorrelation functions, we can derive the relation between spatial correlation dimension and spatial autocorrelation functions. As results, a series of useful mathematical models are constructed, including the functional relation between Moran’s index and fractal parameters. Correlation dimension proved to be a scaling exponent in the spatial correlation equation based on Moran’s index. As for empirical analysis, the scaling exponent of spatial autocorrelation of Chinese cities is *D*_{c} = 1.3623±0.0358, which is equal to the spatial correlation dimension of the same urban system, *D*_{2}. The goodness of fit is about *R*^{2} = 0.9965. This fractal parameter value suggests weak spatial autocorrelation of Chinese cities.

### Conclusion

A conclusion can be drawn that we can utilize spatial correlation dimension to make deep spatial autocorrelation analysis, and employ spatial autocorrelation functions to make complex spatial autocorrelation analysis. This study reveals the inherent association of fractal patterns with spatial autocorrelation processes. The work may inspire new ideas for spatial modeling and exploration of complex systems such as cities.

**Citation: **Chen Y (2024) Derivation of correlation dimension from spatial autocorrelation functions. PLoS ONE 19(5):
e0303212.
https://doi.org/10.1371/journal.pone.0303212

**Editor: **Bedilu Alamirie Ejigu, Addis Ababa University Faculty of Science: Addis Ababa University College of Natural Sciences, ETHIOPIA

**Received: **April 20, 2023; **Accepted: **April 21, 2024; **Published: ** May 31, 2024

**Copyright: ** © 2024 Yanguang Chen. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.

**Data Availability: **All relevant data are within the paper and its Supporting Information files.

**Funding: **The author received specific funding for this work from the National Natural Science Foundation of China (Award Number: 42171192; Recipient: Yanguang Chen). The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.

**Competing interests: ** The authors have declared that no competing interests exist.

## 1 Introduction

In scientific research, one of the keys to the method of data analysis is covariance, which reflects the joint variability of two random variables. In statistics, covariance is defined as the mean value of the product of the deviations of two random variables from their respective means. The application of covariance is extended to two directions. One is correlation coefficient, which can be treated as standardized covariance, and the other is correlation function, which can regarded as generalized covariance. A number of measures have been derived from correlation coefficient, and one of them is spatial autocorrelation coefficient. The typical spatial autocorrelation coefficient is Moran’s index [1]. Based on spatial autocorrelation coefficients, spatial autocorrelation analysis methods has been developed. Spatial autocorrelation analysis originated from statistics and biometrics [1–3]. After the vigorous development of geographers [4–8], spatial autocorrelation analysis is now widely used in geography [9–12], biology [13, 14], ecology [15–18], economics [19–22], and many other fields [23–25]. On the other hand, correlation function analysis is associated with spectral analysis. Spectral analysis includes the methods of power spectrum for time series and wave spectrum for spatial series [26–29]. Today, correlation function is linked to multifractal analysis because the global fractal dimension is based on Renyi entropy and generalized correlation function [26, 30–36]. In theory, the spatial analyses based on correlation coefficients and those based on correlation functions should reach the same goal by different routes, and thus can be integrated into a logical framework.

However, how to establish the relationships between spatial autocorrelation coefficients and fractal dimensions is still not clear enough. Scientific analysis depends on mathematical modeling [37]. There are two well-known obstacles in mathematical modeling: one is spatial dimension [38], the other is time lag [27]. Unfortunately, both of these difficulties are encountered in spatial analysis of complex geographical systems. Geo-spatial data analyses rely heavily on spatial correlation, including autocorrelation and cross-correlation. The precondition of using traditional statistical methods to analyze spatial data is that there is no correlation between spatial sampling points. Otherwise, the probability structure of spatial samples is not determinate due to uncertain mean values, and thus the conventional statistical methods such as regression analysis and principal component analysis will be not credible. In this case, spatial autocorrelation modeling is always employed to make data analysis [4, 5, 7–9]. The common spatial autocorrelation measures include Moran’s index [2], Geary’s coefficient [3], and Getis-Ord’s index [6]. Recently, a new spatial statistic called *B*-statistic, which is based on both geographical and covariate-proximity, was proposed for measuring spatio-environmental autocorrelation [24]. Unfortunately, due to spatial complexity, the values of spatial autocorrelation indexes are often depend on measurement scales. This suggests spatial scaling and fractal patterns. Maybe we can associate spatial autocorrelation coefficient with fractal parameters and find new approaches to making spatial analysis for complex systems such as cities. This paper is devoted to deriving the inherent association of spatial autocorrelation coefficient with spatial correlation dimension. In Section 2, the concepts and models of spatial correlation functions and spatial correlation dimension are clarified, and the then spatial correlation dimension is derived from spatial autocorrelation functions based on Moran’s index. In Section 3, to verify the theoretical results, the derived models are applied to the Chinese cities. In Section 4, the related questions are discussed. Finally, the discussion is concluded by summarizing the main points of this work.

## 2 Theoretical models

### 2.1 Spatial correlation dimension

In the process of spatial analysis, we encounter a paradox. This paradox may suggests the uncertainty principle of spatial correlation. If there is no spatial autocorrelation among a group of spatial elements, the spatial autocorrelation coefficient is reliable and it equals zero in theory. On the contrary, if there is significant spatial autocorrelation, the values of spatial autocorrelation indicators such as Moran’s index will be incredible [39]. The calculation of the spatial correlation coefficient depends on the mean or even the standard deviation [23]. The mean is based on the sum of observational values. Spatial autocorrelation implies that the whole is not equal to the sum of its parts, and therefore the mean and standard deviation are not affirmatory. As a result, the value of spatial autocorrelation coefficients will significantly deviate from the confidence values. One way to solve the above problem is to take into account scaling process of spatial distributions. If so, we should associate spatial autocorrelation with fractal dimension. Among various fractal parameters, the correlation dimension is most likely to be related to the spatial autocorrelation function. In this case, we can derive spatial correlation dimension for geographical systems.

Correlation dimension is one of basic parameters of multifractal systems, and it is actually defined on the basis of Renyi entropy and correlation function. Correlation functions can be divided into two types: correlation density function and correlation sum function. The former is based on density distribution function, and the latter is based on cumulative distribution function [26]). In urban science, spatial correlation density function is also termed density-density correlation function, which can be expressed as follows
(1)
where *c*(*r*) refers to the density correlation, *ρ*(*x*) denotes city density, *x* is the location of a certain city (defined by the radius vector), and *r* is the distance to ** x** and it represents spatial displacement parameter. Spatial displacement in spatial analysis is equivalent to time lag in time series analysis. Both time lag and spatial displacement suggest response delay. In terms of Eq (1), if there is a city at

**, the probability to find another city at distance**

*x**r*from

*x*is

*c*(

*r*). The correlation function based on integral is useful in theoretical deduction. In application, the continuous form should be replaced by discrete form, which can be expressed as (2) where

*S*denotes the area of a geographical unit occupied by a system of cities. The other symbols are the same as those in Eq (1). If we can find the relationship between the correlation function

*c*(

*r*) and the spatial displacement

*r*, we can make a spatial analysis of cities (Fig 1). Eq (1) is the discrete expression of density-density correlation function. Through integral, it can be transformed into a correlation sum function as below [40, 41]: (3) where

*C*(

*r*) is called

*correlation integral*or

*correlation sum*[42],

*A*(

*x*) denotes urban mass. The density correlation is a decreasing function, while the mass correlation is an increasing function. Correlation density functions are susceptible to random perturbations. In contrast, cumulative function has strong anti-noise ability, and thus can better reflect the spatial regularity.

**Note:** The spatial correlation based on fixed scale can be used to calculate Moran’s index, the one point correlation based on local scaling can be used to compute radial fractal dimension, and the point-point correlation based on global scaling can be used to calculate spatial correlation dimension and define spatial autocorrelation function.

In practice, if we use the categorical (nominal) variable to substitute the metric variable, the correlation sum function can be further simplified. Based on spatial nominal variable, Eq (3) can be rewritten as
(4)
which *r* refers to the yardstick indicative of distance threshold, *N* denotes city number, *N*(*r*) is the number of the cities have correlation, *d*_{ij} is the distance between city *i* and city *j* (*i*, *j* = 1,2,3,…,*N*), and *H*(▪) is the Heaviside function. The property of Heaviside function is as below
(5)

This implies that *r* forms a distance threshold by the Heaviside function. If the relationship between correlation sum and the distance threshold follow a power law such as
(6)
we will have a scale-free correlation, and *D*_{c} is the correlation dimension coming between 0 and 2. In Eq (6), *C*_{1} refers to the proportionality coefficient. In empirical analyses, the correlation sum *C*(*r*) can be replaced by correlation number *N*(*r*) to determine fractal dimension. Obviously, the correlation number is
(7)

Then Eq (6) should be substituted with the following relation (8)

where *N*_{1} = *C*_{1}*N*^{2} denotes the proportionality coefficient. Replacing the correlation function *C*(*r*) with the correlation number *N*(*r*) has no influences on the value of the spatial correlation dimension, *D*_{c}. In this case, Eq (8) is actually equivalent to Eq (6) in geographical spatial analysis.

### 2.2 Relation between correlation dimension and autocorrelation function

Generalizing spatial autocorrelation coefficients yields corresponding spatial autocorrelation functions. The spatial autocorrelation function can be regarded as a set of spatial autocorrelation coefficients [43]. Spatial autocorrelation coefficients are determined by size measures and spatial proximity measures. A spatial proximity matrix, **V**, which is a spatial distance matrix or a spatial relation matrix, can be converted into a contiguity matrix as follows: **V** = [*v*_{ij}]. The spatial contiguity can be defined by a relative step function as below
(9)
where *d*_{ij} refers to the distance between locations *i* and *j*, *r* denotes a variable distance threshold. For the diagonal elements (*i* = *j*), if *d*_{ii} = 0 suggests *v*_{ii}(*r*) = 0, then we will have **M**(*r*) = [*v*_{ij}(*r*)]_{N*N}. This is one basis for conventional spatial autocorrelation analysis. On the other, for *i* = *j*, if *d*_{ii} = 0 suggests *v*_{ii}(*r*) = 1, then we will have **M**^{*}(*r*) = [*v*_{ij}(*r*)]_{N*N}. This will be used to make generalized spatial autocorrelation analysis. Obviously, the difference between **M**^{*}(*r*) and **M**(*r*) is a unit matrix **E**, that is **M**^{*}(*r*)- **M**(*r*) = E.

The sum of the elements in the contiguity matrix is as follows (10)

Define an ones vector **o** = [1, 1, …, 1]^{T}, we have *M*_{0}(*r*) = **o**^{T}**M**(*r*)**o**, *M*_{0}^{*}(*r*) = **o**^{T}**M**^{*}(*r*)**o**. Apparently, *N* = *n* = **o**^{T}**Eo**. Thus the number of non-zero elements in the matrix **M**(*r*) is
(11)

According to Eq (7), *N*(*r*) is just the correlation number of cities. In order to unitize the spatial contiguity matrix, define
(12)

Thus we have **W**(*r*) = [*w*_{ij}(*r*)]_{n*n}, **W**^{*}(*r*) = [*w*^{*}_{ij}(*r*)]_{n*n}. With the preparation of the above definitions and symbolic system, we can define the spatial autocorrelation function. Based on standardized size vector **z** and global unitized spatial weight matrix **W**, Moran’s index of spatial autocorrelation can be expressed as [23].

Replacing the determined unitized spatial weight matrix **W** by the variable unitized spatial weight matrix **W**(*r*) yields
(14)

which is a spatial autocorrelation function of displacement based on Moran’s index [43].

The conventional spatial autocorrelation coefficient, Moran’s *I*, is obtained by analogy with the temporal autocorrelation function in the theory of time series analysis. For time series analysis, if time lag is zero (*τ* = 0), the autocorrelation coefficient reflects the self-correlation of a variable at time *t* to the variable at time *t*. In this case, the autocorrelation coefficient must be equal to 1, a known number, and thus yields no any useful information. As a result, the zero time lag is not taken into account in time series analysis. The diagonal elements of the space contiguity matrix correspond to the zero lag of the time series. Accordingly, the values of the diagonal elements of the spatial contiguity matrix is always set as 0. As a matter of fact, the diagonals represent the self-correlation of spatial elements in a geographical system, e.g., city A with city A, city B with city B. This kind of correlation cannot be ignored in many cases. If we consider the zero-lag self-correlation of geographical elements, Moran’s index can be generalized to the following form
(15)

In the spatial weight matrix **W**^{*}(*r*), the values of the diagonal elements are 1. In short, spatial autocorrelation differs from temporal autocorrelation, and the diagonal elements of spatial contiguity matrix can be taken into consideration in some cases.

If a geographical process of spatial autocorrelation has characteristic scales, we will have certain values of Moran’s index. In this instance, the spatial correlation function is not necessary. On the contrary, if a geographical correlation process bears no characteristic scale, the spatial autocorrelation function suggests scaling process in the geographical pattern. Scaling invariance is one of necessary conditions for fractal structure. Thus, maybe we can find the fractal properties in a spatial autocorrelation process. Based on the concepts of spatial correlation functions and spatial autocorrelation functions, the relations between Moran’s index and fractal dimension can be derived. After a series of mathematical reasoning and transformation (S1 File), the relationship between Moran’s index and spatial correlation dimension can be derived as follows (16)

which gives the mathematical relationships between the spatial autocorrelation function, *I*(*r*), the generalized autocorrelation function, *I*^{*}(*r*), and the spatial correlation dimension, *D*_{c}. Considering Eq (4), *C*(*r*) = *N*(*r*)/*N*^{2}, we have a spatial correlation equation such as
(17)

With the increase of *r*, *N*/*M*_{0}(*r*) approaches 0. Thus, for large spatial datasets, we have an approximate expression as below:
(18)
where Δ*I*(*r*) denotes the difference between *I*^{*}(*r*) and *I*(*r*), and the parameter *C*_{1} = *N*_{1}/*N*^{2}.

Up to now, we have derived the exact and approximate relationships between spatial correlation dimension and spatial autocorrelation function. The spatial correlation function comprises a series of spatial autocorrelation coefficients based on Moran’s index. Using observational data, we can testify the main relations derived from the theoretical principle of spatial correlation processes.

## 3 Empirical analysis

### 3.1 Datasets and methods

The goal of this study is to establish a mathematical model that connects spatial autocorrelation and spatial scaling laws. A as Neumann [44] once said: “The sciences do not try to explain, they hardly even try to interpret, they mainly make models.” In this sense, this work relies heavily on mathematical derivation and modeling rather than data analysis. After all, as Karlin [45] pointed out: “The purpose of models is not to fit the data, but to sharpen the questions.” Despite this, it is significant to verify a modeling result by observational data. I am very much in favor of his viewpoint of Louf and Barthelemy [46], who said: “The success of natural sciences lies in their great emphasis on the role of quantifiable data and their interplay with models. Data and models are both necessary for the progress of our understanding: data generate stylized facts and put constraints on models. Models on the other hand are essential to comprehend the processes at play and how the system works. If either is missing, our understanding and explanation of a phenomenon are questionable. This issue is very general, and affects all scientific domains, including the study of cities.” Therefore, the network of Chinese cities can be employed to verify the models derived in last section. For comparability and simplifying the analytical processes, only municipalities directly under the Central Government of China and provincial capitals are taken into account in this case. There are 31 provinces, municipalities, and autonomous regions in Chinese mainland. So, this network includes 31 large cities. Basic data include urban population and railway mileage. Urban population represents city size measure, while the spatial contiguity matrix is generated by railway distances. Population data came from the fifth (2000) and sixth (2010) censuses, and railway mileage came from China’s traffic mileage map. However, two cities, Lhasa and Haikou, were not connected to the network by railway for a long time. Therefore, only 29 cities compose the spatial sample (*N* = 29) (see files S1 and S2 Datasets).

The analytical procedure can be outlined according to the theoretical derivation process. The computational steps are as follows.

#### Step 1: define the yardsticks of spatial correlation.

The yardstick is a variable of distance threshold, which is designed in light of the railway mileage matrix. Its function bears analogy with time lag parameter in time series analysis. If the zero elements on the diagonal are overlooked, the minimum traffic mileage is 137 kilometer and the maximum traffic mileage is 5062 kilometer. So the yardstick length can be taken as *r* = 150, 250, 350, …, 5150.

#### Step 2: calculate spatial correlation function.

Using Heaviside function, Eq (5), we can obtain spatial correlation number *N*(*r*), and spatial correlation function, *C*(*r*). Based on scaling range, the correlation dimension can be evaluated by the power law relation between the yardstick length *r* and spatial correlation number *N*(*r*) or spatial correlation function *C*(*r*).

#### Step 3: compute spatial autocorrelation measurements based on variable yardstick.

The spatial autocorrelation measures include Moran’s index, Geary’s coefficient, and Getis-Ord’s index. This work is mainly based on Moran’s index, supplemented by Geary coefficient and Getis-Ord’s index.

#### Step 4: verify the relationship between spatial autocorrelation measures and fractal dimension.

Using Eq (16) and (18), we can confirm the relationships between Moran’s index and spatial correlation dimension. In theory, this positive study can be generalized to the relationships between fractal dimension and Geary’s coefficient and Getis-Ord’s index.

Analytical process and results depend heavily on the definition and structure of spatial weight matrix. Where structure is concerned, two aspects of factors significantly influence analytical ways. One is diagonal elements, and the other is sum of spatial contiguity matrix. For fractal analysis, the diagonal elements should be taken into account, while for conventional spatial autocorrelation analysis, the diagonal elements should be removed. For generalized spatial autocorrelation analysis, the diagonal elements can be taken into consideration, while for special fractal analysis, the diagonal element can be deleted. On the other hand, for practical spatial autocorrelation function, the sum of spatial contiguity matrix should be fixed to the original sum value. However, for theoretical spatial autocorrelation function, the sum varies with the yardstick length. Different sums of spatial contiguity matrix plus different diagonal elements lead to four approaches to spatial correlation dimension and autocorrelation analyses (Table 1).

### 3.2 Computed results and analysis

Using the above-mentioned data and methods shown above, we can testify the models proposed in this work. In fractal analysis, scaling relationships take on two forms: one is global scaling invariance, and the other is local scaling invariance. The global scaling relations imply that all data points follow power law and form a straight line on the double logarithmic plot. In contrast, the local scaling relations indicate that only part data points follow power law and form a local straight line segment on the log-log plot. In theory, all the scaling relations are global power law relations, but empirically, almost all scaling relationships are local power law relations. In many cases, if the linear scale for measurement is too large or too small, the power law relations break [47]). The local straight line segment represents the scaling range for fractal analysis. Partial calculation results are tabulated as below (Table 2). If the yardstick length is less than 300 milometers or greater than 2700 milometers, the power law relations break. The scaling range varies from 350 milometers to 2650 milometers. The relation between yardstick length *r* and the correlation number *N*(*r*) follows the power law, and the mathematical model based on theoretical derivation result is as follows
(19)

The parameter values of the model are estimated by double logarithmic linear regression based on the least squares method. Diagonal elements of the correlation matrix were taken into account in the calculation process. The goodness of fit is about *R*^{2} = 0.9965, and the spatial correlation dimension is about *D*_{2} = 1.3623±0.0358<1.5 (Fig 2(A)). The symbol “^” denotes that the result is estimated value. The critical value of spatial correlation dimension is 1.5. The above result suggests weak spatial autocorrelation of Chinese cities. If the diagonal elements are removed so that the correlation matrix corresponds to the spatial weight matrix of spatial autocorrelation, the model of spatial scaling relation is as below:
(20)

The goodness of fit is about *R*^{2} = 0.9936, and the spatial correlation dimension is about *D*_{2}^{*} = 1.6869±0.0600 (Fig 2(B)). This result is close to the empirical expected value of fractal dimension of cities, that is, 1.7 [48]. Eq (19) is based on Eq (6) and can be derived from the principle of spatial correlation based on scaling law, while Eq (20) represents an approximate empirical scaling relation for spatial correlation. If and only if the number of elements is infinite, i.e., *N*→∞, there is no difference between the two equations. However, there are still many scholars who prefer to use the empirical relationship rather than the theoretical model to estimate the correlation dimension [49–51].

**Note:** The solid dots represent the total number of spatial correlations, and the hollow blocks represent the points within the scaling range. The latter is a subset of the former.

The spatial correlation dimension has been theoretically associated with spatial autocorrelation functions based on conventional Moran’s indexes and generalized Moran’s indexes. This relation can be verified by Eq (16) or Eq (17). For the dataset in 2000, the mathematical model is as below: (21)

The coefficient of determination is about *R*^{2} = 0.9965, and the spatial correlation dimension is around *D*_{c} = *D*_{2} = 1.3623. Eq (21) can be transformed into the following correlation model
(22)
which is equivalent to Eq (19). Where spatial correlation function is concerned, this is the dimension estimation value based on an exact relation. Then, the 2010 urban census data is used to replace the 2000 urban census data, and the calculation results remain unchanged (Fig 3). The reason is that the spatial weight matrix has not changed. This suggests that the spatial scaling exponent of Eq (16) or Eq (17) depend on spatial contiguity matrix rather than urban population sizes. Spatial correlation dimension is only determined by spatial patterns. In this sense, for spatial complex systems, element size is a fast variable, while spatial contiguity is a slow variable. For self-organizing cities, slow variables dominate fast variables [52].

a. 2000. b. 2010. **Note:** The solid dots represent the total number of spatial autocorrelation functions, and the hollow blocks represent the points within the scaling range. The scaling range corresponds to that in Fig 2.

If the spatial correlation number is significantly greater than the city number, the exact relation between Moran’s function and yardstick length can be replaced by an approximate relation. Through Eq (18), we can verify this approximate scaling relation (Fig 4). For the dataset from 2000, the model based on the least square calculation is as follows (23)

a. 2000. b. 2010. **Note:** The solid dots represent the total number of difference of Moran’s functions, and the hollow blocks represent the points within the scaling range. The scaling range is consistent with those in Figs 1 and 2.

The goodness of fit is about *R*^{2} = 0.9919, and the spatial correlation dimension is estimated as about *D*_{c} = 1.3892. For the data from 2010, the model is as below:
(24)

The goodness of fit is about *R*^{2} = 0.9812, and the spatial correlation dimension is about *D*_{c} = 1.2979. The goodness of fit decrease, and the fractal dimension estimation results departed from the expected value. In this case, both urban population sizes and spatial contiguity matrix influence the parameter estimation values.

This study is devoted to exploring the theoretical relationships between spatial autocorrelation and spatial dimension. The aim is at revealing the scaling law in spatial autocorrelation processes. The positive analysis of spatial autocorrelation and fractal dimension of urban systems is not the main task of this work. Based on the above calculation results, the inferences can be made as follows. First, spatial correlation dimension depends on spatial contiguity matrix. It is independent of size measures. Even if the city sizes changes, but the spatial distances between cities does not change, then the spatial correlation dimension remains unchanged. In this case, the relationships between Moran’s function and spatial correlation dimension do not change. Second, the difference between common Moran’s function and generalized Moran’s function relies on both spatial contiguity matrix and size measures. If the number of cities in a region is large enough, the difference between the two types of Moran functions can be used to take place of the reciprocal of the correlation function. This relationships between the function difference values and yardstick lengths follow power law and give spatial correlation dimension approximately. In this instance, the spatial correlation dimension value is sensitive to the city sizes. A conclusion can be drawn that theoretical spatial correlation dimension depends on the patterns of spatial distribution rather size distribution. However, if we estimate the correlation dimension using the approximate formula, the result can be impacted by the size measure.

## 4 Discussion

Scientific research begins with description of a phenomenon and ends with understanding its essence. Accurate and quantitative scientific descriptions rely on mathematical methods. Mathematical methods in scientific research fall into two categories: one is based on characteristic scale, and the other, based on scaling invariance (Table 3). The key of conventional mathematical modeling and quantitative analysis are to catch characteristic scales [27, 53]. However, for complex systems such as cities, we cannot find characteristic scale in many cases [30]. In this case, an advisable method is to replace characteristic scale with scaling exponent. Fractal geometry provides a powerful tool for scaling analysis. Moran’s index is an eigenvalue of generalized spatial correlation matrix and represents a characteristic scale of spatial autocorrelation [43]. Unfortunately, for complex spatial process, Moran’s index depends on spatial proximity and cannot serve as a real characteristic scale. It is necessary to extend spatial autocorrelation coefficient to spatial autocorrelation function. The creation of the spatial autocorrelation function analysis method was inspired by the spatial correlation graph [43], which is referred to as *correlogram* in the literature [9, 20, 24, 54–57]. The correlogram can be used to detect the characteristic scale of spatial autocorrelation under some conditions [57]. A discovery is that, for the complex systems without characteristic scale, spatial autocorrelation function is related to scaling invariance within certain scale range [43]. The scaling invariance can be characterized by spatial correlation dimension. Spatial correlation dimension is a special scaling exponent, and it can be employed to complement the spatial autocorrelation function based on Moran’s index for complex spatial processes and patterns.

Spatial correlation dimension is one of basic multifractal parameters. Multifractal scaling represents an important approach to describing a broad range of heterogeneous phenomena [58]. The classic theme of geography is *areal differentiation*, which can also be regarded as one of basic spatial effects caused by location [59]. Areal differentiation leads to spatial difference in geographical systems such as networks of cities. Thus, spatial correlation dimension provides an effective quantitative description of spatial heterogeneity in geographical research. In fact, multifractal dimension spectrum is definition based on both entropy and correlation function [31]. Entropy can be used to reflect spatial heterogeneity, while correlation function can be utilized to reflect spatial dependence. Spatial heterogeneity and spatial dependence are two central notions of geographical analysis [21, 59]. In this sense, spatial correlation dimension is helps to integrate spatial heterogeneity analysis and spatial dependence analysis into a logical framework. The above mathematical process suggests that, based on the relative step function of distance, spatial autocorrelation coefficients can be generalized to spatial autocorrelation functions. The typical spatial autocorrelation coefficient is Moran’s index. The spatial autocorrelation function on the basis of Moran’s index can be expressed as Eq (14). Taking into account the self-correlation of geographical elements, which appear on the diagonal of the spatial correlation matrix, the standard spatial autocorrelation function can be extended to the form of equation (15). Eqs (14) and (15) proved to be associated with the reciprocal of spatial correlation functions. The spatial correlation dimension *D*_{c} can be derived from the standard spatial autocorrelation function *I*(*r*) and the generalized spatial autocorrelation function, *I*^{*}(*r*). Thus, the mathematical relationships between fractal dimension, autocorrelation coefficients, and spatial correlation dimension have been brought to light.

Moreover, the spatial correlation dimension can be linked to Geary’s coefficient and Getis-Ord’s index. The relationship between Moran’s index and Geary’s coefficient can be demonstrated as
(25)
where **o** = [1 1 … 1]^{T}, **z**^{2} = [*z*_{1}^{2} *z*_{2}^{2} … *z*_{n}^{2}]^{T}. Introducing the spatial displacement parameter *r* into Eq (25) yields the autocorrelation functions based on Geary’s coefficient as follows
(26)
where *C*_{g}(*r*) denotes Geary’s function, and the right subscript *g* is used to differentiate Geary’s function from spatial correlation function. Considering Eqs (8) and (11), and then rewriting Eq (16) yields
(27)

Substituting Eq (27) into Eq (26) yields spatial correlation equation based on Geary’s coefficient, that is
(28)
which gives the relationships between the spatial autocorrelation function based on Geary’s coefficient and spatial correlation dimension *D*_{c}. If *n* is large enough, then (*n*-1)/*n* is close to 1 and *N*/*M*_{0}(*r*) approaches 0, and Eq (28) can be replaced by an approximation relation.

Further, we can derive the relationship between Getis-Ord’s index and spatial correlation dimension. Substituting the standardized size vector, **z**, in Eq (13) with the global normalized size vector based on sum, **u**, we can transform the formula of the spatial autocorrelation function based on Moran’s index into that of Getis-Ord’s index as follows
(29)

Then, replacing **W**(*r*) with **W**^{*}(*r*), we can generalized standard spatial autocorrelation function to the following form
(30)
in which **u**^{T}**u** is a constant. Similar to the process of derivation of the relationships between Moran’s index and spatial correlation dimension, a relation between Getis-Ord’s index *G* and fractal dimension *D*_{c} can be derived as
(31)
where *N*(*r*) = *N*^{2}*C*(*r*). Eq (31) represents a spatial correlation equation based on Getis-Ord’s index. Accordingly, for large spatial datasets, an approximate relation is as below:
(32)

So far, the common spatial autocorrelation coefficients, including Moran’s index, Geary’s coefficient, and Getis-Ord’s index, have been generalized to spatial autocorrelation functions. All these spatial autocorrelation functions have been associated with spatial correlation dimension. Thus, Based on the ideas from fractals, three types of spatial autocorrelation measurements have been integrated into the same logic framework of spatial analysis (Table 4).

The derivation results suggest that the spatial correlation dimension reflect both the spatial autocorrelation and spatial interaction. Moran’s index is a spatial correlation coefficient, Geary’s coefficient is a spatial Durbin-Watson statistic, while Getis-Ord’s index proved to be equivalent to the potential formula under certain conditions. Moran’s index and Geary’s coefficient reflect the extent and property of spatial autocorrelation, while Getis-Ord’s index reflect both the spatial autocorrelation and spatial interaction. All these spatial statistics are associated with the spatial correlation dimension. In this sense, the spatial correlation dimension contain two aspects of geographical spatial information: spatial autocorrelation and spatial interaction. It is easy to calculate the spatial autocorrelation functions based on Geary’s coefficient *C*_{g}(*r*) and Getis-Ord’s index *G*(*r*), and the results correspond to Moran’s function *I*(*r*) (Table 5).

The ideas from correlation are important in the research on both city fractals and fractal cities. As indicated above, one of fractal dimension definitions is based on generalized correlation function. Spatial correlation can be divided into four types based on equation (9) (Fig 1). If *r* is a constant, we will have a correlation based on fixed scale, which is used to define the common spatial autocorrelation coefficient; if *r* depends on the size of geographical elements, we will have correlation based on characteristic scales; if *r* is a variable but *i* or *j* is fixed to a certain element, we have a local scaling correlation, which can be used to define radial dimension of cities; if *r* is a variable and *i* and *j* are not fixed to a certain element, we have a global scaling correlation, which can be used to define spatial correlation dimension derived above. The local correlation is termed one point correlation or central correlation, while the global correlation is termed point-point correlation or density-density correlation [23]. The former reflects the 1-dimensional correlation, while the latter reflect the 2-dimensional correlation. Spatial correlation is one of approaches to estimating fractal dimension of cities [48, 60, 61]. A number of interesting studies have been made to calculate fractal dimension of urban form, and the method can be combined with dilation method [62–66]. The spatial correlation can be integrated into the percolation analysis to model the complex evolution of urban growth [67–69]. The above results form a bridge between spatial correlation of urban patterns and spatial autocorrelation of geographical processes by means of the concepts from fractals and scaling.

Compared with the previous studies on spatial autocorrelation, this work is based on scaling law rather than characteristic scales. In literature, some studies involved the concept of spatial scaling, but do not delve into the essence of scaling laws [55]. Some scholars attempt to lessen the influence of spatial autocorrelation in the process of conducting scaling analysis of urban hierarchies [70]. The novelty of this paper lies in revealing the mathematical relationships between spatial autocorrelation functions and spatial correlation dimension. First, the strict mathematical relation between Moran’s index set and spatial correlation dimension was derived. Thus, the common spatial analysis based on characteristic scale is associated with the spatial analysis based on scaling law. Second, the above-mentioned relation was generalized to Ceary’s coefficient and Getis-Ord’s index. This is helpful for developing a logic framework for spatial scaling analysis based on autocorrelation functions. Third, a complete case analysis was presented. This is useful for understanding spatial autocorrelation of Chinese cities. Fractal dimension suggests scaling law, and scaling invariance suggests nonlinear spatial autocorrelation rather than linear autocorrelation. The linear autocorrelation process is simple and can be described and analyzed using linear algebra and statistics. The nonlinear autocorrelation process is complex and requires the introduction of scaling analysis ideas and methods based on linear algebra and statistics to effectively describe and analyze it.

A good academic research result lies in its inspiration effect rather than its perfection. The shortcoming of this work lies in three respects. First, the spatial weight matrix is based on conventional concept, and special spatial separation factors have not been considered. The spatial autocorrelation function and corresponding correlation dimension rely heavily on the form, structure and types of spatial weight matrices. Generally speaking, weighting matrices for spatial autocorrelation analysis are constructed by means of the concept of spatial proximity or distance-decay functions. However, in some cases, two locations which are close geographically but separated by other factors such as lakes, rivers, mountains, and buildings may not be treated as near neighbors. A new finding is that weighting matrices based on combination of geographical proximity with covariate information may solve the problem, and *B*-statistics as a new spatial measure emerged as the times require [24]. Unfortunately, how to use the *B*-statistic including covariate information to construct spatial autocorrelation function and estimate spatial correlation dimension is an outstanding issue. Second, the size variable fails to be introduce to improve the definition spatial correlation dimension. Where cities are concerned, the fractal dimension of spatial correlation depends on the spatial distribution rather than size distribution of cities. In contrast, spatial autocorrelation functions based on Moran’s index and Getis-Ord’s index comprise both spatial contiguity measure and size measure. In the future, the size measure should be introduced into the definition of spatial correlation dimension as a weight form. Third, the empirical analysis for the spatial autocorrelation functions based on Geary’s coefficient and Getis-Ord’s index are not made for the time being. Although different spatial autocorrelation functions proved to be equivalent to one another, it is still necessary to make case studies to verify the theoretical inferences. However, limited to the space of a paper, the related empirical studies are not implemented. Moreover, the empirical analysis is only based on the observational data of Chinese cities. If we can obtain the spatial dataset of other countries, maybe we can make a comprehensive positive studies. Unfortunately, due to the limitation of observed data, the work remains to be done in the future.

## 5 Conclusions

Significant autocorrelation of a spatial sampling result suggests invalid mean values, which leads to uncertain probability structure. In this case, conventional statistical analysis cannot lead to reliable inference for complex systems. It is necessary to find new methods based on scaling law concept for spatial analysis. Spatial autocorrelation functions are actually a type of generalized correlation functions, and correlation functions are the base for defining generalized correlation dimension. Using correlation dimension, we can characterize multifractal scaling of complex systems such as cities. One of simple and important approach to constructing spatial autocorrelation functions based on spatial autocorrelation coefficients is to make use of the relative step function based on variable distance threshold. Thus, we can derive the spatial correlation dimension from the spatial autocorrelation functions. The main conclusions of this study can be reached as follows. *First*, *the spatial correlation dimension can be calculated by means of the relationships between the standard spatial autocorrelation function and the generalized spatial autocorrelation function*. The spatial autocorrelation coefficients are not enough to reflect the complex dynamics process of geographical evolution. Spatial autocorrelation functions can be employed to characterize the spatio-temporal dynamics of geographical systems, but the measurement procedure and quantitative description are complicated. Using spatial correlation dimension, we can condense sets of spatial parameters into a simple number, and thus it is easy to make spatial analyses of geographical processes. *Second*, *the spatial correlation dimension depends on spatial contiguity matrix rather than the size measure of geographical elements*. Changing size measure such as city population does not influence the relationships between spatial autocorrelation functions and spatial correlation dimension. However, changing distances between geographical elements in a region leads to different relationships between Moran’s functions and yardstick length and thus results in different spatial correlation dimension values. This suggests that the common spatial correlation dimension depends on spatial distribution patterns instead of size distribution patterns. Further, this suggests that spatial contiguity represent slow variable while size measure represents fast variable in geo-spatial analysis. *Third*, *the scaling ranges of spatial correlation dimension reflect the geographical scope of spatial autocorrelation and interaction*. In theory, the spatial correlation dimension is absolute, but in practice, the spatial correlation dimension is a relative measure and is always valid within certain range of measurement scales. By means of log-log plots, the scaling range can be approximately identified visually. The scaling range corresponds to the scope of positive autocorrelation reflected by the generalized spatial autocorrelation function based on Moran’s index. This implies that the scaling range represents a quantitative criterion of spatial agglomeration of geographical distributions.

## Supporting information

### S1 File. Mathematical derivation process.

This file provides a detailed derivation process for the relationship between spatial correlation dimension and spatial autocorrelation function based on Moran’s *I*.

https://doi.org/10.1371/journal.pone.0303212.s001

(DOCX)

### S1 Dataset. SACF for 2000.

This file includes the observational data for the year 2000 and the related calculations based on this data. By studying this data table, readers can easily understand the data processing in the paper and its corresponding relationship with mathematical models derived in this work.

https://doi.org/10.1371/journal.pone.0303212.s002

(XLSX)

### S2 Dataset. SACF for 2010.

This file includes the observational data for the year 2010 and the related calculations based on this data. This example further displays the data processing process of the case analysis for readers’ reference.

https://doi.org/10.1371/journal.pone.0303212.s003

(XLSX)

## Acknowledgments

I would like to thank the anonymous reviewer and Dr. Ejigu whose interesting and constructive comments were very helpful in improving the quality of this paper.

## References

- 1. Moran PAP. The interpretation of statistical maps. Journal of the Royal Statistical Society, Series B. 1948; 37(2): 243–251.
- 2. Moran PAP. Notes on continuous stochastic phenomena. Biometrika. 1950; 37(1–2): 17–33 pmid:15420245
- 3. Geary RC. The contiguity ratio and statistical mapping. The Incorporated Statistician. 1954; 5(3): 115–145.
- 4. Anselin L. Local indicators of spatial association—LISA. Geographical Analysis. 1995; 27(2): 93–115.
- 5.
Cliff AD, Ord JK. Spatial Autocorrelation. London: Pion; 1973.
- 6. Getis A, Ord JK. The analysis of spatial association by use of distance statistic. Geographical Analysis. 1992; 24(3):189–206.
- 7.
Haggett P, Cliff AD, Frey A. Locational Analysis in Human Geography. London: Edward Arnold; 1977.
- 8.
Griffith DA. Spatial Autocorrelation and Spatial Filtering: Gaining Understanding Through Theory and Scientific Visualization. New York: Springer; 2003.
- 9.
Cliff AD, Ord JK. Spatial Processes: Models and Applications. London: Pion; 1981.
- 10. Dray S. A new perspective about Moran’s coefficient: spatial auto-correlation as a linear regression problem. Geographical Analysis, 2011; 43(2): 127–141.
- 11. Getis A. Spatial weights matrices. Geographical Analysis. 2009; 41 (4): 404–410.
- 12. Griffith DA, Morris ES, Thakar V. Spatial autocorrelation and qualitative sampling: The case of snowball type sampling designs. Annals of the American Association of Geographers. 2016; 106(4): 773–787.
- 13. Naimi B, Skidmore AK, Groen TA, Hamm NAS. Spatial autocorrelation in predictors reduces the impact of positional uncertainty in occurrence data on species distribution modelling. Journal of Biogeography. 2011; 38(8): 1497–1509.
- 14. Sokal RR, Oden NL. Spatial autocorrelation in biology. 1. Methodology. Biological Journal of the Linnean Society. 1978; 10(2): 199–228.
- 15. Dray S, Legendre P, Peres-Neto PR. Spatial modeling: a comprehensive framework for principal coordinate analysis of neighbor matrices (PCNM). Ecological Modelling. 2006; 196(3–4): 483–493.
- 16. Kim D. Predicting the magnitude of residual spatial autocorrelation in geographical ecology. Ecography. 2021; 44(7): 1121–1130.
- 17. Legendre P. Spatial autocorrelation: Trouble or new paradigm? Ecology. 1993; 74(6): 1659–1673.
- 18.
Sokal RR, Thomson JD. Applications of spatial autocorrelation in ecology. In: Legendre P., Legendre L. (Eds). Developments in Numerical Ecology, NATO ASI Series, Vol. G14. Berlin: Springer-Verlag; 1987. pp431–466.
- 19. Beck J, Sieber A. Is the spatial distribution of mankind’s most basic economic traits determined by climate and soil alone? PLoS ONE. 2010; 5(5): e10416. pmid:20463959
- 20. Dubin RA. Spatial autocorrelation: A primer. Journal of Housing Economics. 1998; 7(4): 304–327.
- 21. Geniaux G, Martinetti D. A new method for dealing simultaneously with spatial autocorrelation and spatial heterogeneity in regression models. Regional Science and Urban Economics. 2018; 72: 74–85.
- 22.
Ward MD, Gleditsch KS. Spatial Regressive Models. London: SAGE Publications; 2008.
- 23. Chen YG. New approaches for calculating Moran’s index of spatial autocorrelation. PLoS ONE. 2013; 8(7): e68336. pmid:23874592
- 24. Ejigu BA, Wencheko E. Introducing covariate dependent weighting matrices in fitting autoregressive models and measuring spatio-environmental autocorrelation. Spatial Statistics. 2020; 38: 100454.
- 25. Griffith DA, Chun YW. Spatial autocorrelation and uncertainty associated with remotely-sensed data. Remote Sensing. 2016; 8(7): 535.
- 26. Chen YG. Fractal analytical approach of urban form based on spatial correlation function. Chaos, Solitons & Fractals. 2013; 49(1): 47–60.
- 27. Liu SD, Liu SS. Soliton and Turbulence. Shanghai: Shanghai Scientific & Technological Education Publishing House; 1994 [In Chinese].
- 28.
Stein JY. Digital Signal Processing: A Computer Science Perspective. New York: Wiley; 2000.
- 29. Stoica P, Moses R. Spectral Analysis of Signals. Upper Saddle River, NJ: Prentice Hall; 2005.
- 30. Chen YG. Equivalent relation between normalized spatial entropy and fractal dimension. Physica A: Statistical Mechanics and its Applications. 2020; 553: 124627.
- 31.
Feder J. Fractals. New York and London: Plenum Press; 1988.
- 32. Grassberger P. Generalized dimension of strange attractors. Physics Letters A. 1983; 97: 227–230.
- 33. Grassberger P. Generalizations of the Hausdorff dimension of fractal measures. Physics Letters A. 1985; 107(1): 101–105.
- 34. Halsey TC, Jensen MH, Kadanoff LP, Procaccia I, Shraiman BI. Fractal measure and their singularities: The characterization of strange sets. Physical Review A. 1986; 33: 1141–1151.
- 35. Hentschel HE, Procaccia I. The infinite number of generalized dimensions of fractals and strange attractors. Physica D: Nonlinear Phenomena. 1983; 8: 435–444.
- 36.
Vicsek T. Fractal Growth Phenomena. Singapore: World Scientific Publishing Co.; 1989.
- 37.
Holland JH. Emergence: from Chaos to Order. Cambridge, Massachusetts: Perseus Books; 1998.
- 38. Waldrop M. Complexity: The Emerging of Science at the Edge of Order and Chaos. NY: Simon and Schuster; 1992.
- 39. Chen YG. Spatial autocorrelation equation based on Moran’s index. Scientific Reports. 2023; 13: 19296. pmid:37935705
- 40. Chen YG, Jiang SG. Modeling fractal structure of systems of cities using spatial correlation function. International Journal of Artificial Life Research; 2010; 1(1): 12–34.
- 41. Yang ZR. Fractal Physics. Shanghai: Shanghai Scientific and Technological Education Publishing House; 1996 [In Chinese].
- 42.
Williams GP. Chaos Theory Tamed. Washington, D.C.: Joseph Henry Press; 1997.
- 43. Chen YG. An analytical process of spatial autocorrelation functions based on Moran’s index. PLoS ONE. 2021; 16(4): e0249589. pmid:33852621
- 44.
Neumann J von. Collected Works (Vol.6). New York/Oxford: Pergamon Press; 1961. page 492.
- 45.
Karlin S. Eleventh RA Fischer Memorial Lecture. Royal Society, 20 April 1983; 1983 [quoted from: Buchanan M. Ubiquity: The Science of History or Why The World is Simpler Then We Think. London: Weidenfeld & Nicolson; 2000. page 85].
- 46. Louf R, Barthelemy M. Scaling: lost in the smog. Environment and Planning B: Planning and Design. 2014; 41: 767–769.
- 47.
Bak P. How Nature Works: the Science of Self-organized Criticality. New York: Springer-Verlag; 1996.
- 48.
Batty M, Longley PA. Fractal Cities: A Geometry of Form and Function. London: Academic Press; 1994.
- 49. Lee CY, Jung S. Statistical self-similar properties of complex networks. Physical Review E. 2006; 73(6): 066102. pmid:16906909
- 50. Theiler J. Estimating fractal dimension. JOSA A. 1990; 7(6): 1055–1073.
- 51. Retière N, Sidqi Y, Frankhauser P. A steady-state analysis of distribution networks by diffusion-limited-aggregation and multifractal geometry. Physica A. 2022; 600: 127552.
- 52.
Portugali J. Self-Organization and the City. Berlin: Springer; 1999.
- 53. Takayasu H. Fractals in the Physical Sciences. Manchester: Manchester University Press; 1990.
- 54. Bjørnstad ON, Falck W. Nonparametric spatial covariance functions: Estimation and testing. Environmental and Ecological Statistics. 2001; 8: 53–70.
- 55. De Knegt HJ, van Langevelde F, Coughenour MB, Skidmore AK, De Boer WF, Heitkönig IMA, et al. Spatial autocorrelation and the scaling of species–environment relationships. Ecology. 2010; 91 (8): 2455–2465. pmid:20836467
- 56.
Legendre P, Legendre L. Numerical Ecology (2nd edition). Amsterdam: Elsevier Science; 1998.
- 57.
Odland J. Spatial Autocorrelation. London: SAGE Publications; 1988.
- 58. Stanley HE, Meakin P. Multifractal phenomena in physics and chemistry. Nature. 1988; 335: 405–409.
- 59.
Anselin L. The Moran scatterplot as an ESDA tool to assess local instability in spatial association. In: Fischer M, Scholten HJ, Unwin D (eds.). Spatial Analytical Perspectives on GIS. London: Taylor & Francis; 1996. pp.111–125.
- 60.
Frankhauser P. La Fractalité des Structures Urbaines (The Fractal Aspects of Urban Structures). Paris: Economica; 1994.
- 61. Frankhauser P. The fractal approach: A new tool for the spatial analysis of urban agglomerations. Population: An English Selection. 1998; 10(1): 205–240.
- 62. De Keersmaecker M-L, Frankhauser P, Thomas I. Using fractal dimensions for characterizing intra-urban diversity: the example of Brussels. Geographical Analysis. 2003; 35(4): 310–328.
- 63. Thomas I, Frankhauser P, Badariotti D. Comparing the fractality of European urban neighbourhoods: do national contexts matter? Journal of Geographical Systems. 2012; 14(2): 189–208.
- 64. Thomas I, Frankhauser P, Biernacki C. The morphology of built-up landscapes in Wallonia (Belgium): A classification using fractal indices. Landscape and Urban Planning. 2008; 84(2): 99–115.
- 65. Thomas I, Frankhauser P, De Keersmaecker M-L. Fractal dimension versus density of built-up surfaces in the periphery of Brussels. Papers in Regional Science. 2007; 86(2): 287–308.
- 66. Thomas I, Frankhauser P, Frenay B, Verleysen M. Clustering patterns of urban built-up areas with curves of fractal scaling behavior. Environment and Planning B: Planning and Design. 2010; 37(5): 942–954.
- 67. Makse H, Havlin S, Stanley HE. Modelling urban growth patterns. Nature. 1995; 377: 608–612.
- 68. Makse HA, Andrade JS Jr., Batty M, Havlin S, Stanley HE. Modeling urban growth patterns with correlated percolation. Physical Review E. 1998; 58(6): 7054–7062.
- 69. Stanley HE, Andrade JS Jr., Havlin S, Makse HA, Suki B. Percolation phenomena: a broad-brush introduction with some recent applications to porous media, liquid water, and city growth. Physica A. 1999; 266: 5–16.
- 70. Xiao YX, Gong P. Removing spatial autocorrelation in urban scaling analysis. Cities. 2022; 124: 103600.