The OLS estimates of location premia after sorting may be biased if the error term in regression model (2) is spatially correlated with errors in neighboring locations (Aselin 2003). We assess the h,ll,tt εε extent of spatial autocorrelation by performing the following tests on the residuals. First, for each h,ll̃,tt εε country, we average the residuals across locations and evaluate whether these mean residuals are closely distributed around zero. This first test suggests that there is no clustering of residuals at location level. Second, we formally test for spatial autocorrelation of the mean residuals using the Moran’s I test for global spatial autocorrelation. The index for this test can be obtained by estimating the following regression: W , (8) where is the standardized variable of interest (e.g., residuals, location premia), = ρρWW+ εε W is the spatial lag of the variable and is the spatial weight matrix (Anselin 1995). The Moran’s I statistic takes WW values between [-1,1] and evaluates the extent to which locations are interdependent. A positive (negative) value of Moran’s I indicates that positive (negative) spatial autocorrelation exists across WW WW ρρ locations. Appendix Table A7 shows estimates of the Moran’s I statistic along with p-values testing the null hypothesis for randomization or absence of spatial autocorrelation. The results in columns 1 and 2 of this table indicate that we cannot reject the absence of spatial autocorrelation of residuals. ρρ� The absence of spatial autocorrelation of residuals implies that the OLS estimates of location premia after sorting are unbiased. Yet, the estimated location effects are spatially correlated as shown in columns 3 and 4 of Appendix Table A7.

# _4.2 Estimated location premia by municipality type_

In line with the steep rise of population density along the urban gradient (Table 2), the denser the municipality, the further to the right is its distribution (Figure 3) and the higher its average location premia (Table 4). This is expected as economic agents benefit from stronger agglomeration economies and better learning externalities and market access in municipalities with higher population density. However, the rural-urban differences in average location premia at the end of the 2010s are small in most cases (last two columns of Table 4). Rather than a clear rural-urban-metropolitan divide, there is a gradation in labor and place productivity premia by type of municipality.

The location premia density charts, displayed in Figure 3, overlap in all cases to different extents. In Mexico, the highest location premia are not observed in the largest metropolitan areas, but in a few smaller metropolitan areas, large urban centers, and even some rural municipalities. Still, because the variation of location premia in larger metropolitan/urban areas is smaller, on average the location premia in less dense rural municipalities are lower than those in denser metropolitan areas.

In Brazil, the overlap of the rural and urban density plots is much less pronounced. There is a clear double-hump rural-urban pattern of lotion effects, which shows that the majority of rural municipalities have lower productivity premia than the majority of urban or metropolitan municipalities. In Colombia, the overlap in location premia by type of municipality is akin to the one observed in Mexico.<sup>17</sup> In Chile and the Dominican Republic, except for a few urban municipalities

> 17 We do not have data to estimate location premia after sorting by type of settlement in Colombia because SEDLAC data do not offer household information below the 1<sup>st</sup> administrative region.

15