Symbolic Analysis Applied to the Specification of Spatial Trends and Spatial Dependence

This article provides symbolic analysis tools for specifying spatial econometric models. It firstly considers testing spatial dependence in the presence of potential leading deterministic spatial components (similar to time-series tests for unit roots in the presence of temporal drift and/or time-trend) and secondly considers how to econometrically model spatial economic relations that might contain unobserved spatial structure of unknown form. Hypothesis testing is conducted with a symbolic-entropy based non-parametric statistical procedure, recently proposed by Garcia-Cordoba, Matilla-Garcia, and Ruiz (2019), which does not rely on prior weight matrices assumptions. It is shown that the use of geographically restricted semiparametric spatial models is a promising modeling strategy for cross-sectional datasets that are compatible with some types of spatial dependence. The results state that models that merely incorporate space coordinates might be sufficient to capture space dependence. Hedonic models for Baltimore, Boston, and Toledo housing prices datasets are revisited, studied (with the new proposed procedures), and compared with standard spatial econometric methodologies.


Introduction
Spatial trends have not played a prominent role in explaining and understanding how the outcomes in one geographical location are related to the outcomes in nearby locations (regions, countries, or points in space). This is especially evident in the spatial econometric literature. This absence contrasts with the role that time trends have played in time series econometrics for explaining economic outcomes that are close in temporal terms. One plausible explanation for this is that there are not enough statistical tools for testing if the data are compatible with a spatial trend. This paper aims to deal with the use of spatial trends when modeling and studying economic relations where directly or indirectly there are spatially correlated missing variables.
As one might think, questions regarding, e.g., how neighboring outcomes affect (or are affected by) the outcome (or behavior) of a given firm, state, county or-in general terms-a given institution, are central questions that are of interest in many scientific domains. Particularly, spatial spillovers and geographically clustered errors have been at the core of the development of spatial econometrics. For example, for real-estate economics, it is of much relevance to understand how neighboring home prices affect the sale price of a given house. It is not evident how traditional econometrics can deal with this spillover effect, while spatial econometrics [1,2] has proposed a well-known method to capture outcomes that might depend on outcomes in "nearby" locations but not those further away. To do so, a simple way to capture these restrictions is to define a W matrix to reflect spatial connectivity among neighbors, so-called spatial weight matrix, that have served as a basis for different econometric model specifications that explicitly incorporates spatial lags. A typical example, although there are many others that we comment and use in this paper, is the model Y = βX + ρWY + ε where Y is the dependent variable, X contains explanatory variables of Y, ε stands for the error term, and W is the weight matrix or matrix of connections. Another classic model is Y = βX + u, where u = ρWε + ν, i.e., there is spatial autocorrelation in the errors. There are other spatial econometric models that are used below that share a common denominator, namely that space enters into the equation through W. However, in this paper, we explore the possibility of introducing space differently (see [3,4]) whenever specification tests indicate it. From this point of view, one of the contributions of the paper is to build the steps between parametric spatial models and semiparametric ones. One of the key elements in this link is the role played by the weight matrix.
The use of the weight matrix W has been a controversial issue over the past few years. The two main and more severe critiques were by [5,6]. McMillen's critique is based on the fact that introducing space via the error or the dependent variable is to control for unknown sources of spatial dependence, while most of the literature takes a leap on faith by considering or viewing the model as a correct parametric form. Furthermore, as argued by Gibbons and Overman, the use of W in the dependent variable and/or in the error structure might be pointless for identifying causal links and it also could be easily biased because W might be endogenous. Another related source of problems is that the specification of W is often arbitrary, as this selection is made a priori, depending on the user's judgment. This decision is extremely important because, if matrix W is misspecified in some way, parameter estimates are likely to be biased and they will be inconsistent in models that contain some spatial lag, as stated in [7]. Furthermore, the consequences for evaluating effects of policy decisions can be serious if model specification is not conducted properly.
In this paper, we propose to statistically study other ways of incorporating space to control for unknown sources of spatial dependence before relying on W. We firstly focus on testing for (weak) spatial dependence in the presence of a leading deterministic components, similar to time-series tests for unit roots in the presence of drift and/or trend. To do so, we rely on a recent statistical procedure based on symbolic entropy developed in [8] [GMR] to determine whether a cross-sectional dataset is statistically compatible with a leading deterministic component in the form of a spatial trend. Secondly, we focus on well-known housing price datasets, and we study if some spatial trend can capture the spatial dependence. Thirdly, for those cases that were found statistically compatible with a spatial trends, a geographically restricted semiparametric approach is proposed to specify a model avoiding the critical points on W.
Some geographers and econometricians have highlighted the possibility of existence of spatial trends, and its application in the spatial analysis. The aim of trend analysis is to divide the spatial behavior of the data into (at least) two parts, namely the trend surface and the residuals, which are deviations of the measurements from the fitted trend surface, and they are the uncertain (random, stochastic) component. Caragliu and Nijkamp in [9] tried to identify spatial trends using Moran's I statistics in their work as well. Basile and Ciccarelli in [10] studied a spatial location patterns of the various branches of the Italian manufacturing industry, including a simple semiparametric model with a smooth spatial trend to control for time-invariant unobserved heterogeneity. Earlier, Mur and Trivez [11] discussed the unit roots in spatial econometrics, introducing a common scale factor for all observations into the SAR model. Nevertheless, all the analyses performed were based on the assumption that the spatial trend already exists in the data. There existed no tools to test if this assumption is true on the raw data (or even in the residuals) before introducing trend models into the analysis. This procedure is somehow a criticizable method for model specification which is probably explained by the absence of available tests for spatial trends (authors relied on Moran's or Geary's tests that are well-established tests but for null hypothesis that are not related with trends). As indicated above, we use the GMR test for deterministic dynamics in spatial processes for specifying models. As a first step, we try to detect whether there exists a trend in a given spatial dataset, that is to say, we wonder if the observed data are compatible with spatial dependence in the form of a spatial trend, and, thus, we wonder how to model it. Modeling a spatial trend (if there is one) in our data might let us control for the variability of the phenomena occurred over the regions and therefore most of the problems that arose as a consequence of using and selecting W would not apply.
From an applied point of view, we focus our attention on the house market that has been already widely explored by spatial econometricians, among others. One of the reasons to incorporate spatial effects into the hedonic house price model is that the model form is intended to capture either interaction effects, market heterogeneity, or both. Another reason is that, here, spatial autocorrelation in omitted variables, or unobserved externalities and heterogeneities, are relegated to the error term [1,12].
It is realistic to consider that there might exist some type of spatial trend in hedonic housing models that aim to explain price on basis of their characteristics, among which geographical location is an important explanatory variable for price formation [12]. To make a proper analysis, we consider three datasets on house pricing and along with the characteristics of the houses sited in Baltimore, Boston, and Toledo to estimate several hedonic models implementing the proposed approach. We aim at answering if spatial trends (linear and/or nonlinear) together with other explanatory variables (house characteristics) are able to properly capture the spatial structure for these three datasets. All the models in this paper were estimated with Matlab and R routines that are available for interested readers. The same availability applies to all datasets.
The remainder of the paper is organized as follows. Section 2 describes the methodology that is applied in Section 3, where we describe the analysis and the results obtained, and elaborate on comparisons obtained with other available methods. Section 4 concludes and provides some hints for further research on the topic. An extensive appendix is supplied to complete all models' estimations because otherwise reading the paper would be less effective.

Methodology
As mentioned in the Introduction, central to the paper is the use of a test for spatial deterministic structure, which is based in symbolic analysis. Symbolic analysis has been previously used in the geographical literature to (help) specify spatial models. The interested reader is referred to the works of [13][14][15]. Recently, GMR, using symbolic methods, is put forward as a nonparametric statistical procedure for testing for misspecification in terms of potential spatial trends. According to the authors, the proposed nonparametric statistic-which we refer to as delta-test-is aimed to cover a clear and well-known gap in the literature, namely to test if raw spatial data are compatible with some form of spatial trend.
The most used nonparametric test for spatial dependence is the Moran's I test, which aims to test if there exists a spatial dependence in the data or not. Moran's I is a correlation coefficient that measures the overall spatial autocorrelation of the dataset. It measures how one object is similar to others surrounding it. If objects are attracted by each other, it means that the observations are not independent. Despite the fact that Moran's test is designed for testing spatial structure, it is unable to detect certain spatial nonlinear dependences. For example, consider the spatial model X s = aX s−1 (1 − X s−1 ) with fixed initial conditions (X 0 = 0.7, a = 3.57), where the set of neighbors of s is {s + 1, s + 2, ..., s + m + 1}, m, s ∈ N, has an obvious and simple spatial structure, which also lacks of stochastic components. However, Moran's I test fails to reject the null of no spatial autocorrelation, regardless the sample size. One plausible explanation for this performance is that Moran's test is not designed to deal with nonlinearities. Fortunately, delta-test is robust against nonlinearities of simple and complex form and therefore is able to clearly capture the spatial trend, as have been shown in GMR.
A generally accepted practice has been to test for spatial dependence using Moran's test on georeferrenced economic raw data. If the test rejects the null of no spatial dependence, the data analyst might consider several forms of building spatial econometric models. The vast majority of researchers will try to specify and then estimate a model of the general type Y = ρWY + αι n + Xβ + WXθ + u, u = λWu + ε where Y represents an n × 1 vector consisting of one observation on the dependent variable for every unit in the sample (i = 1, ..., n), ι n is an n × 1 vector of ones associated with the constant term parameter α, X denotes an n × k matrix of explanatory variables associated with the k × 1 parameter vector β, and ε = (ε 1 , ..., ε n ) T is a vector of independently and identically distributed disturbance terms with zero mean and variance σ 2 . As mentioned in the Introduction, this has been criticized mainly for the problems derived from incorporating space dependence with W. Notice that all these specifications consider that the potential spatial model has no deterministic spatial trends. This in part is probably due to the fact that until now there has been no way to test for leading spatial trends.
The delta-test, which we briefly describe below, tests for the null of a non-stochastic leading term in a spatial dataset {X s } s∈S where S is a set of coordinates. To do so, the spatial realization {X s } s∈S is embedded in an m-dimensional space: f (X s ) = (I ss 1 , I ss 2 , . . . , I ss m−1 ) where I ss j is an agreement indicator function of being above or below the median at locations s and s j . Γ is the set of 2 m−1 different vectors of dimension m − 1 with entries in the set {0, 1}, where we refer to each symbol by σ i . Obviously, it is required that the spatial process X s has a finite median, otherwise the test cannot be applied, which is not a very strict limitation. Then, the relative frequency, p σ , of each symbol is computed from the data, and the associated entropy of the dataset is calculated: The delta-test consists on estimating the behavior of a function of the difference where W j and W j+1 are sets of symbols chosen at random from Γ. Under the null of a non-stochastic spatial structure, that difference does not increases with the number of considered symbols. Particularly, the delta-test is implemented by testing if α 1 = 0 in the following regression The delta statistic is a test well-suited to detect simple and complex spatial trends. Provided with the delta-test, (dh − test) in the following tables, we can supplement the spatial analysis by firstly applying the test to the spatial raw data. In the case of a non-rejection of the null hypothesis of deterministic spatial leading term, the possibility of specification of a scenario with spatial (deterministic) trends opens for the econometric modeler. A natural way for modeling this situation from an econometric point of view is by using what we call restricted semiparametric regression: where each element on vector Y is a continuous output variable in a given location. Xβ contains all explanatory variables (i.e., a set of explanatory variables that can include categorical variables and where vector β collects fixed parameters). The important nonparametric part f (a, b) is restricted to geographic functions of longitude and latitude, a, b, respectively. At this point, according to the rejection of the null hypothesis of non-stochastic spatial leading term, there is no evidence for introducing in the model a weight matrix (W), neither in the parametric part Xβ nor in the nonparametric one. Several comments are important thereon. (i) The previous family of models aims to ascertain whether a specification of space via latitude and longitude might serve to control for spatial dependence, once the researcher has had statistical evidence of a spatial trend. (ii) At this stage, prior to the use of a given W weight matrix, we wonder if considering some form of geographical variables in the model is enough to correctly estimate vector β. This will avoid the severe consequences in estimation and inference (about β) of not considering spatial dependence when it really exists, as occurs in many fields. (iii) Notice also that the family of models in Equation (3) will not be an object of the main critiques that spatial econometrics has received by scholars, that we comment in in the previous section.
The delta-test can be used as a diagnostic tool helping in the model selection procedure. Consider a model that erroneously omits some form of spatial dependence we understand that the omission can be in the form of a linear spatial dependence or in the form of a spatial trend. An example of the former is while the latter can be of the form However, the choice between these specifications is non-trivial. Interestingly, for model specification, the delta-test can be used to distinguish between them if the test is applied to the residuals of the misspecified model, that is, if it is applied toû. In the case of a true spatial dependence via W, the delta-test will tend to point that no spatial trend is found in the residuals, and therefore the researcher will have to deal with a statistically correct specification of the model (this will be probably done through well-known models in the spatial econometrics literature, as we indicate below in this paper). In this regard, we expect that Moran's I test will correctly indicate spatial autocorrelation in the residuals. On the contrary, the delta-test will point out that a spatial trend is omitted if the true spatial dependence comes in the form a non-stochastic geographic spatial structure (spatial trend). Obviously, the researcher should now take a different modeling strategy, as she has put forward a statistically compatible spatial trend. In other words, it should be required to propose some form of f (a, b).
Our proposed selection procedure consists on specifying the model using the previous diagnostics' tools. Particularly, we firstly run delta-test on the raw data to check for existence of deterministic structure and we also run Moran's test to check if there is a spatial autocorrelation in the data we use. If delta-test cannot reject the statistical existence of a spatial trend, we introduce a geographical additive model of the form given in Equation (3). In particular, we consider and study two forms for the geographically restricted nonparametric part, f (a, b). The first way (that we refer to it as delta-model strategy) is to restrict f (a, b) to be a low-degree polynomials of coordinates, which is inspired in the practice in time-series modeling of including powers of t-time.
We use letters A, B, ..., G to indicate the model specification we refer to. For example, by Model B, we mean Y = αι n + Xβ + f B (a, b) + ε. The second way of geographically restricting the general term f (a, b) consists on modeling according to where vector z is a set of variables whose effects enter the equation non-parametrically. In this paper, we consider the following configurations of the nonparametric part: where f (z) is fully nonparametric and is limited to variables longitude and latitude; where the spline simply adds a set of interaction terms between dummy variables and cubic terms to a standard cubic function, and where S are equal intervals ranging from and there is a dummy variable D s indicating whether x is greater than x s . C-spline is used as an analogy approximation to the G-model we introduced before. This allows us to make better comparison of the models that are in the same analysis line. Finally, a Fourier based spline of the form where z = 2π(x−min(x))/(max(x)−min(x)).
Recall that splines and series regression are based on the mathematical theory of the approximation of functions. Particularly, spatial-econometricians that are concerned with approximating the conditional expectation function find very useful the Weierstrass-Stone theorem A.1 which states that any continuous function can be uniformly well approximated by a polynomial of sufficiently high order, under mild regularity conditions. There are mathematical results that point out that, when the true conditional expectation function is smoother, it is possible to approximate it with a fewer number of series terms. This explains why other spline methods such as B-splines or P-Splines can be used instead of (or together with) the ones we have selected. The central point is the same one as in the delta-models: basically considering coordinates can be a first step to control for spatial relationships. One or more of these simple structures (i.e., a family of models) can approximate a spatial trend even in the case of a nonlinear spatial trend.
Potentially, all these geo additive models can therefore be used to model the initial detected spatial trend on the raw data. Once estimated all these models, we choose the estimated one that has residuals that indicate absence of spatial dependence. To this end, delta and Moran's tests are both used in the residuals of each model.
Alternatively, if the delta-test on the raw data points to no spatial structure, while Moran's I does, then spatial models of the form indicated in Table 1 have to be used. Once these models have been estimated, there will be some models for which Moran's I (and also delta-test) indicate that no spatial structure is remaining in the residuals. In case there is more than one estimated model, then we use AIC criterion for choosing one of them.
The selection criteria and an illustrative form for how to choose the model are given in Figure A1. In the next section, the proposed specification procedure is illustrated on three real spatial datasets.

Modeling Housing Prices via Hedonic Models
Numerous economists have empirically considered that the price of a house, building or piece of land is determined by the characteristics of the property itself (e.g., its size, appearance, features such as patios or rooms or fireplaces, and condition of the property), as well as characteristics of its surrounding environment (e.g., if the neighborhood has a high crime rate and/or is accessible to schools and a downtown area, the level of water and air pollution, or the value of other homes close by). To model the relation between price and those characteristics, several hedonic models have been used. Hedonic pricing is a model which identifies price factors according to the premise that price is determined both by internal characteristics of the good being sold and external factors affecting it. From our point of view, the relevance of estimating a hedonic price models is to estimate the extent to which each factor (characteristic) affects the price of the home. Apart from classic hedonic models, [16] proposed a semiparametric approach, including a f (x c , y c ) nonparametric function of the location of the observations. Day, et al. [17] used a two-dimensional vector of coordinates to explain the variability in housing prices. Additionally, [18] used the coordinates of localization (latitude and longitude) of each observation as heteroskedasticity source in their analysis. Although there exist studies that tried to include the location as an explanatory variable, there were no existing tool that could permit us make an analysis without including W. Thus, in our analysis, we check if there might exist a model that merely incorporating space coordinates might be sufficient to capture space dependence. For this reason, we focus our study on well-studied data on housing prices in Baltimore (https://geodacenter.github.io/data-and-lab//baltim/), Boston (https://geodacenter. github.io/data-and-lab//boston-housing/), and Toledo (https://www.spatial-econometrics.com/), as these are perfect examples of the market where space, along with other characteristics, is directly introduced. Over the past years, researchers have made a great input to the housing prices analysis, taking into account spatial and temporal factors. Thus, we complement the existing analysis, including the possibility of spatial trends existence in the data.

Baltimore Housing Prices
House prices and characteristics from Baltimore were firstly studied by [19]. The data come from the 1978 multiple listings for Baltimore (Maryland) that contain structural descriptors of the house, the sales price, and the address. Each house is assigned coordinates by locating the address on the Maryland coordinate system. The dependent variable is the selling price of the house and the exogenous variables include the attributes of the structure of the house and its sale: Number of rooms (NROOM), information on if the house is a detached unit (=1) or not (DWELL), number of bathrooms (NBATH), if the house has patio (PATIO), fireplace (FIREPL), air conditioning (AC), basement (BMENT), number of stories (NSTOR), number of car spaces in garage (GARAGE), age of dwelling (AGE), dummy variable that takes a value of 1 if the dwelling is located in Baltimore county (CITCOU), lot size (LOTSZ), interior living area (SQFT), and the month of 1978 in which house was sold (STIME).
Moran's test on the data on Baltimore housing prices gives a clear evidence of the spatial autocorrelation ( Table 2). The delta-test on the raw data confirms the presence of deterministic structure, which gives evidence in favor of running restricted semiparametric analysis, including spatial trend. Following the modeling proposal given in the previous section (see also Figure A1), we firstly model the deterministic part by using the so-called delta-models. Results for Models A and B are clearly in favor, as the estimated model controls for the spatial dependence of the data: both delta-test and Moran's test indicate that spatial structure is controlled with Models A and B. In other words, our estimation of the extent to which each characteristic of the house affects the house's price is safely estimated, which was one of the main concerns as initially claimed. The same conclusion is reached if we opt for some spline-based methods.
For illustrative purposes, we show what happens if instead we model according to models in Table 1, despite the fact that delta test results do not recommend to take that modeling strategy. To this end, we estimate all the W-based model specifications and we find that the best spatial models for our data are SDM and SEM models. This conclusion is reached by using AIC. One interesting conclusion of the results given in Table 2, is that using ACI criteria and neglecting the use of delta-test, will lead us to a improvable specification as neither SDM nor SEM models are able, according to delta-test results, to remove the previously found spatial trend. In other words, the residuals of these models are compatible with a deterministic structure that has not yet been removed. For this reason, results seem to point out that restricted semiparametric models work better in this case, as they let us get rid of the spatial structure of the model and thus get more credible results on the estimates. The practical implications for Baltimore housing prices are mainly relative to the partial effects of several explanatory variables, but not to the list of significant variables or to the signs. #of embedding dimensions m = 6; dh-test p-value on raw data 0.13; ***, **, * = coefficient estimates that are significant at the 0.01, 0.05 and 0.1 level, respectively. Numbers in bold state if the model controls for spatial structure (Moran p-value > 0.1) and/or controls the spatial trend in the data (dh-test p-value < 0.1).

Boston Housing Prices
The second dataset includes data for census tracts in the Boston Standard Metropolitan Statistical Area (SMSA) in 1970. These data were used by [20]. It is interesting mainly because it considers environmental characteristics as hedonic determinants of the price. The Boston sample contains 506 census tracts (one observation per census tract) on 14 non-constant independent variables (with tracts containing no housing units or comprised entirely of institutions excluded). These variables include crime rate (CRIME), proportion of area zoned with large lots (ZONING), proportion of non-retail business area (INDUSTRY), location contiguous to the Charles River (CHARLESR), levels of nitrogen oxides (NOXSQ), average number of rooms (ROOMS), proportion of structures built before 1940 (HOUSEAGE), weighted distances to the employment centers (DISTANCE), an index of accessibility (ACCESS), property tax rate (TAXRATE), pupil-teacher ratio (PUPIL/TEACHER), black population proportion (BLACKPOP), and lower status population proportion (LOWCLASS).
The results of Moran's test and delta-test on the data on Boston housing prices give a clear evidence in favor of spatial structure. After estimating spatial trends, the results (Table 3) show that the deterministic part has been removed, but there still is a spatial structure according to Moran's I.
Therefore, it is justified modeling according to models given in Table 1. All the results are reported in Table A2 in appendix. In this case, the best choice would be GNS and SAC models that correct for spatial structure in the sense that both Moran and delta-tests statistically indicate that spatial structure has been controlled (see Table 3). AIC values on these two models suggest choosing SAC, but the difference is very mild. As happened with the previous dataset, the list of relevant explanatory variables is common to all the models. Variations are again on the partial effects.

Toledo Housing Prices
The third dataset is the dataset on housing prices in Toledo, Ohio, United States. It includes data on average house values for 98 census tracts along with 10 explanatory variables and latitude-longitude coordinates. Explanatory variables include the neighborhood quality (Neighborhood), net lot square foot (Lot sqft), total square foot living area (Total sqft), family room conditions (Family room), recreation room conditions (Rec room), air conditioning (Air cond), number of bathrooms (Baths), condition of the house (Condition), garage condition (Garage condition), and the age of the house (Age).
As happened with the other two datasets, Moran's test and delta-test report spatial structure. As regards restricted semiparametric models, it is worth mentioning that both delta models and spline models are able to control for both types of spatial dependences, as can be observed in Table 4, which can be completed with information found in the appendix. This is similar to what happened with Baltimore's housing dataset and model. The interesting difference with respect to Toledo's model is that there is also a spatial model (from the set of models given in Table 1) that also controls for spatial dependence, namely SEM estimated model. Now, the researcher has to choose between modeling with a geo additive model or with a W based model. In both cases, the estimated models are able to control for spatial dependence. If the modeler is uncomfortable with or suspicious of using a given W matrix because of some of the reasons explained in the Introduction of the paper, we would recommend using a restricted semiparametric model approach. From the practical point of view, it is remarkable that for this dataset the variable "condition" has no statistical relevance if semiparametric models are adopted, while it has an impact if the SEM model is selected. Something similar happens with the fact that the house does or does not have a recreation room. #of embedding dimensions m = 5; dh-test p-value on raw data 0.11; ***, **, * = coefficient estimates that are significant at the 0.01, 0.05 and 0.1 level, respectively. Numbers in bold state if the model controls for spatial structure (Moran p-value > 0.1) and/or controls the spatial trend in the data (dh-test p-value < 0.1).

Conclusions
The focus in this paper is on cross-sectional spatial data modelization. The article contributes, on the one hand, to the use of specification tests in order to assess the robustness of the results, once it is recognized that our ability to accurately model spatial data is very limited. On the other hand, it also contributes to the debate around the W weight matrix in formulating spatial econometrics models. There are several challenges when econometrically modeling economic relations for which space can have a relevant role. The combination of missing correlated over space variables along with many sources of potential nonlinearities has led scholars to consider that conventional parametric spatial models are not necessarily the best modeling strategy. We firstly argue that it is critical to use specifications tests in order to validate results. This explains why we propose (and develop on): (i) the use of a nonparametric test for spatial structure of unknown (either linear o nonlinear) form along with other available tests; and (ii) the use of geographically-restricted semiparametric models that assume that the true model is unknown. To put it differently, we argue that, supported by powerful statistical tools, semiparametric models and estimators could be used before going through conventional spatial lag models.
This article has studied hedonic price functions and estimates because housing price formation has been a central object for the implementation of policy decisions and therefore model specification may be particularly important. The three studied cites are independent among them. Regarding specifications issues, the main conclusion is the following: spatial dependence structure (potentially of unknown form) can be controlled by restricted semiparametric models that do not use W matrix specification; however, there might be spatial data relationships for which spatial structure can only be controlled at the cost of assuming a W matrix of connections. Given the potential consequences of a wrong specification, those models that avoid a W matrix are preferred. However, if the modeler requires the use of weight matrix (as might happen), according to our results, robust specification tests are recommendable to be used to choose the best parametric model.
Several lines of further research can be proposed. From a boarder point of view, this paper contributes to the spatial econometric literature around open concerns for the scholars, in particular to the literature on spatial dependence bias, on functional form bias and on spatial dependence bias. However, other concerns remain open for further research, namely the potential interaction between geo additive terms and covariates of particular interest for researchers. Moreover, it might be the case that the proposed strategy could be compatible with the models that include other sources of spatial autocorrelation, which can be studied further on. From the applied side, this study centered on housing prices; however, there are other well studied cross-sectional datasets (along with their economic relationships) for which space is a natural source of variation and explanation that has kept the attention of geographical modelers (industry location and knowledge spillovers, among others). In this vein, some models could be revised to double-check and understand the existence of remaining traces of spatial dependence.
Funding: This research received no external funding.

Conflicts of Interest:
The author declares no conflict of interest.

Appendix A Appendix A.1. Weierstrass-Stone Theorem
If X is any compact space, let A be a subalgebra of the algebra C(X) over the reals R with binary operations + and × . Then, if Acontains the constant functions and separates the points of X (i.e., for any two distinct points x and y of X, there is some function f in A such that f (x) = f (y)), A is dense in C(X) equipped with the uniform norm. This theorem is a generalization of the Weierstrass approximation theorem.

Appendix A.2. Mechanism of Choosing the Best-Fit Spatial Model (Spatial Mechanism)
After running spatial models' regressions, one of the criteria used to choose is the likelihood ratio (LR) test based on the log-likelihood function values of the different models. The LR test is based on minus two times the difference between the value of the log-likelihood function in the restricted model and the value of the log-likelihood function of the unrestricted model: −2 × (logL restricted − logL unrestricted ). This test statistic has a Chi squared distribution χ 2 n with n degrees of freedom equal to the number of restrictions imposed. The election rule states that, if LR test > χ 2 n , then the unrestricted model performs better than the restricted one. Using this criterion, we can make a comparison of the models, the way shown below. Other models cannot be compared among themselves with LR test, as they are not nested. The only two models that are not nested but can be compared are SAR and SEM models. The criteria used to make a comparison is the Lagrange multiplier tests [21] for the SAR and SEM model specification tests, robust to the presence of other types of spatial interactions), which make it possible to choose among the SAR, SEM, or non-spatial model. The rest of the models can only be subjectively compared, checking the significance of the estimated coefficients and the structure of the model.

Appendix A.3. Model Selection
Our procedure ( Figure A1) consists in specifying the model using the previous diagnostics' tools. Particularly, we first run delta-test on the raw data to check for existence of deterministic structure and Moran's test to check if there is a spatial autocorrelation in the data we use. If delta-test cannot reject the statistical existence of a spatial trend, we introduce and estimate a geographical additive model of the form given in Equation (4). On the parallel line, we introduce and estimate spline models. After the estimation of all the models, we choose the one that controls both the spatial structure of the data and the spatial trend existence from each set of the model (geo additive and spline sets), evaluating the p-value of the Moran test and dh-test. Then, we repeat the same procedure for classic spatial models; if there is no model that controls both spatial structure and spatial trend presence, we choose the one that is the best following Akaike criterion.     #of embedding dimensions m = 7; dh-test p-value on raw data 0.20; ***, **, * = coefficient estimates that are significant at the 0.01, 0.05 and 0.1 level, respectively. #of embedding dimensions m = 5; dh-test p-value on raw data 0.11; ***, **, * = coefficient estimates that are significant at the 0.01, 0.05 and 0.1 level, respectively.