Market fragmentation and the rise of sub-national regulation

The evaluation of the Single European Market requires a better knowledge of the level of integration both between and within the EU countries. While some institutions are pushing for greater integration between EU countries, others may be introducing—purposely or collaterally—additional barriers to interaction. Several reports have reported the high levels of market fragmentation prevailing within Spain. This paper aims to determine whether regional borders influenced the patterns of intra- and interregional trade between the 18 regions of Spain (Nuts 2) over a long period of time (1995–2017). While trade is more intense within regions than between them, our results suggest the presence of spatial and temporal heterogeneity in the estimated home bias. We also investigate empirically the effect that the quantity and quality of national, regional and local regulations have on the economic performance of firms, in both the industrial and the service sectors. We use different non-spatial and spatial-gravity models, which yield robust results.


Introduction
The Single European Market (SEM), which lies at the heart of the European project, extends a friendly jurisdiction to promote the free exchange of goods and services.
According to a recent EU report on the performance of the SEM (European Commission 2019; WIFO and ESRI 2019), the intra-EU trade of goods has expanded significantly in the last few years, mainly through the integration of Central and Eastern European Member States. However, it has been observed that new or changing regulations in different countries continue to create unnecessary or unjustified technical barriers to trade. Discrepancies between product rules can impose additional costs on exporting enterprises and restrict inter-EU trade. Something similar can take place in relation to EU integration for the service sector, with cross-border trade declining in part because of disproportionate regulatory restrictions, barriers to trade associated with standards, or restricted access to the public procurement, at all levels of administration.
In parallel to the presence of barriers to trade between countries within the EU, proliferating regulations at sub-national levels within each country can introduce additional barriers to the SEM. For instance, the European Commission might dynamize the suppression of non-tariff barriers to trade between countries whilst sub-national entities within these countries continue to introduce new obstacles to intra-national trade flows.
The risk is not just confined to the EU and its regions but applies more generally to all highly decentralized countries within economically integrated areas (Alvarez et al. 2019), where firms and individuals face a morass of regulations issued by international, national, regional and/or municipal institutions. This issue is echoed in an expanding academic literature that seeks to bridge the gap between our understanding of what are the determinants of internal and external trade performance of a country and its effects on productivity and welfare. For example, Ramondo et al. (2016) discussed how changing the assumption of full integration within a country can greatly affect our conclusions on the benefits to countries of openness and globalization. In the same vein, new empirical evidence has recently emerged on the link between intra-national trade integration and a country's overall economic performance, with several applications for the USA (Yilmazkuday 2012, 2020), China (Zhu 2012 Our paper addresses the case of Spain, whose level of market fragmentation appears to be sub-optimal, with potentially detrimental consequences for productivity and economic growth. With the ultimate objective of deepening the integration of its internal market, Spain approved the Law of Guarantee of Market Unity (LGUM 20/2013) on 9 December 2013. This law was inspired by the principles of the SEM and intended to reduce the high levels of fragmentation of Spain's domestic market. There has been, however, a setback in the LGUM's implementation, due to the null declaration of key provisions by the Spanish Constitutional Court in June 2017 (see the Electronic Supplementary Material for more details). This paper aims to shed further light on the level and characteristics of the fragmentation of the Spanish market and how it may relate to the existing sub-national regulations. Our point of departure is an up-to-date estimate of internal border effects for Spain, building from the latest literature on gravity models. Our empirical quantification of the internal border or home bias draws from an extended time window, covering the years 1995 to 2017. To estimate the magnitude of the internal border effect in Spain, as it is standard in the literature, we control for a wide range of factors likely to influence the magnitude of trade flows between the regions of Spain. We also estimate variation in the home bias across regions and importantly over time and thereby find some evidence that it rose in the aftermath of the Great Financial Crisis. The magnitude and evolution of this effect attempts to illustrate the extent of economic integration within Spain and the magnitude of non-tariff barriers to intra-national trade. Moreover, we explore related literature (Chen 2004;Requena and Llano 2010) to explain how various factors can give rise to border effects endogenously. 1 Crucially, we want to determine whether the existence of an internal border effect relates to regulatory activity within the country, and we enrich our gravity equation with newly constructed variables aimed to capture the quantity and quality of the regulatory framework within which firms operate. Because of limitations in the data, it is not possible to establish a cause-effect analysis that fully explains how the introduction of a specific regulation in one region might affect its trading behaviours. However, we argue these novel combinations of data sources can shed new light on the extent to which an excess of regulatory provisions can be associated with a decrease of trade flows within the country.
In order to do this, we enrich our gravity model two indicators, developed by Marcos (2010), to capture regulation intensity at the regional level. We proxy this with the number of pages published in the official journals and the quantity of new legislation issued by each region.
Then, we join our trade database with several other indicators from the Encuesta de Opinión sobre Entorno Empresarial (EOEE). The EOEE has been produced every quarter since 2013 by the Spanish Institute of Statistics (INE) and provides several qualitative measures of the perception among firms of the quality of regulation at various administrative levels: national, regional and local. Detailed information about this survey is provided in the corresponding section and the Electronic Supplementary Material. The dataset here is at the lowest level of disaggregation available, capturing region-sector-year variations. To the best of our knowledge, this dataset has never been explored at this level of detail. We choose to focus on variables related to the Quality of Regulation faced by the firms of each region (at the Nuts 2 level) operating in three broad sectors: Industry, Trade (wholesale and retail) and Transportation and tourism.
In addition, our paper makes a small methodological contribution by connecting different strands of the literature using the gravity equation. On the one hand, some authors, such as Head and Mayer (2014), have recently emphasized the need to develop further the theoretical underpinnings of the gravity model. This tradition, now reframed in the structural gravity approaches (Agnosteva et al. 2019;Anderson and Yotov 2010), strongly underlines the indispensable use of inward and outward multilateral-resistance indices. This is precisely the approach we use in the first part of the paper, following the canonical specification in this literature, which uses the OLS and PPML pooled regression with time-origin and time-destination fixed effects.
In parallel, other authors have stressed that the potential presence of spatial and network dependence might bias classical estimation of the gravity equation (Black 1992;Bolduc et al. 1992;Griffith 2007;LeSage et al. 2007;LeSage and Pace 2008;Fischer and Griffith 2008;Burger et al. 2009;LeSage and Pace 2009;LeSage and Llano 2013;Sellner et al 2013;LeSage and Thomas-Agnan 2015;Krisztin and Fischer 2015;Metulini et al. 2018).
Few articles have tried to link theory-based non-spatial gravity with spatial-gravity approaches (Behrens et al. 2012;Koch and LeSage 2015). The empirical literature applying the main specification of each of these methodologies (FE gravity vs. spatial-gravity vs. gravity-spatial filtering) is also scant (Sellner et al. 2013;Metulini et al. 2018).
In our case, thanks to the generous contribution of James LeSage and co-authors, and Richard Sellner and co-authors (Sellner et al. 2013), we combine and compare the results obtained by several specifications of the gravity equations, using panel and cross-section set-ups.
As explained by LeSage and Pace (2008), the spatial and network dependence effects can be origin-based (neighbours of the exporting regions) or destinationbased (neighbours of the importing regions). This is explained by the underlying latent or unobserved missing covariates, which exert a similar impact on neighbouring observations of any give ij dyadic observation. In addition to similar transport costs or common factor endowments, one may consider that other positive/negative unobservable channels can enhance/erode trade by means of similar socio-economic regulations existing across the regions of Spain. Such possibility is explored in some of the empirical specifications, by using different weight matrices, such as the standard contiguity matrix, and other alternatives defined using an index of 'regional regulation proximity'.
Our results show there is heterogeneity between the 'home bias' computed at the regional level and the intensity of regional regulation, suggesting unsurprisingly that the proliferance of regulations is not the only factor interfering with interregional trade. Our final analysis suggests that the types and quality of regulation at the national, regional and local level may also be a factor affecting flow of goods between and within regions. Moreover, the quality of regulation in key services sectors (transportation, wholesale and retail) also exerts a range of effects on intranational flows.
Section two of this paper reviews the background of the literature on market integration and the border effect. Section three lays out the empirical strategy with a focus on the panel data specification using PPML and OLS. Section four describes the data used to implement it. Section five provides a comprehensive descriptive analysis and a summary of the econometric results for this first specifications. Then, section six describes the methodology and the main results for a number of spatialgravity equations. The last section concludes and sketches the implications of our results for policy making.

Background
The existence of large border effects is one of the main puzzles of international macroeconomics (Obstfeld and Rogoff 2000). The seminal paper by McCallum (1995) found that trade between any two Canadian provinces was (on average) 22 times greater than trade between any Canadian province and any US state.
In parallel, we also find in the literature estimates of the home bias within countries [internal border effect]. This is defined as how much more trade a region (province) of a given country conducts with itself, compared to that with any other region (province) of the same country. Wolf (2000), for example, while investigating the extent of market fragmentation in the USA, found intra-state trade unduly high in relation to inter-state trade. Later, Hillberry and Hummels (2008) analysed the impact of geographical frictions on trade, using data for truck deliveries within the US at different spatial levels. Other authors have conducted similar analyses for a range of other countries and specifications (Wrona 2018;Yilmazkuday 2012;Heinemeyer et al. 2008;Shultze and Wolf 2009;Millimet and Osang 2007;Daumal and Zignago 2008;Combes et al. 2005;Hillberry and Hummels 2003;Helliwell and Verdier 2001;Djankov and Freund 2002).
The case of Spain has been also analysed by several authors. Requena and Llano (2010) estimated the internal and external border effect at the regional level (Nuts 2), finding that on average the internal border effect reaches a value of 17 on average: that is, the average Spanish region will trade 17 times more with itself than with the rest of the country. Garmendia et al. (2012) re-estimated the internal border effect in Spain using provincial data (Nuts 3), exploring social and business network effects. Gallego and Llano (2014) estimated the internal and external border effect for the Spanish case, of considering region-to-region flows (Nuts 2) within Spain, as well as between Spain and the regions of the eight largest EU countries.
We also find more recent investigations studying the nexus between international and intra-national trade within a country and how the reduction or elimination of non-tariff barriers to trade can foster productivity and economic growth.
In this regard, Tombe and Zhu (2019) analysed how goods-and labour-market frictions affect aggregate labour productivity in China. Combining unique data within a general equilibrium model of internal and international trade, which considers migration across regions and sectors, they quantify the magnitude and consequences of trade and migration costs. They find that a large part of China's recent labour productivity growth is due to improved internal integration. A related analysis by Yongzhengi and Guangliangi 2019) examined in particular the impact of competition policy on inter-regional trade barriers between provinces in China. Using data from 28 Chinese provinces for the period 1994-2013, they showed that the implementation of competition policy (measured by a number of indices built on institutional and regulatory data) can reduce interregional trade barriers and found more salient evidence for provinces with a less corrupt political environment.
Moreover, several recent papers have investigated the case of Canada. Agnosteva et al. (2019) quantified unobservable trade barriers for intra-national trade flows within Canada, using external trade with the rest of the world as a required control. In a related work, Beaulieu and Rafat-Zaman 2019) empirically examined the effects of various Canadian interprovincial trade agreements to promote intra-national trade. As they highlight, a major motivation for the bilateral and multilateral interprovincial trade agreements in Canada dated from the mid-1990s was to facilitate trade across provinces, by lowering non-tariff barriers. Their empirical exercise also relied on the gravity model and panel data on interprovincial trade in goods and services for 1992-2013. Their results complemented previous analyses of the effect of the nationwide interprovincial AIT agreement (Anderson and Yotov 2010).
Finally, Alvarez et al. (2019) studied how non-tariff internal trade barriers (NTBs) in Canada are important factors explaining its productivity growth path. Non-tariff trade barriers might arise because of diverging regulations between provinces, and/ or because of the division of powers and responsibilities between federal and provincial authorities. Although focussed on a single country, their analysis suggested an interesting parallelism between what is observed in Canada and what has been tested in other places with similar data (Australia, China and the EU).

The empirical model
The backbone of our investigation is the gravity equation, which presumes that the intensity of trade between any two locations (regions) is positively related to their economic size and inversely related to the trade costs between them. The gravity model has been commonly used to model international and interregional trade flows (Head and Mayer 2014).
By internal border effect, we denote the number of times a Spanish region trades more with itself than with any other region in the country. We define the effect in terms of home bias, expecting a positive and significant coefficient for intra-regional trade. Our specifications take inspiration from some classic papers on the estimation of border effects with sub-national units in Canada and the USA (McCallum 1995; Anderson and van Wincoop 2003;Feenstra 2002) and include refinements from recent contributions (Poncet 2003(Poncet , 2005Gallego and Llano 2014;Head and Mayer 2014;Agnosteva et al. 2019).
For the sake of brevity, we define a single equation [1] that contains all the models used in this article. It includes variables that will be switched on or off depending on the specification in use.
where T ijt is the euro value of exports (imports) from (to) region i to (from) region j (country j) in year t, divided by the product of Y it Y jt , which corresponds to the product of the GDPs of the trading partners in each year. This approach, standard in the literature (Anderson and van Wincoop 2003;Poncet 2003Poncet , 2005Llano 2014, 2015), avoids the problems of circular causation introduced by having GDPs on the right-hand side and trade flows on the left.
Note that if i = j the flow is intra-regional, whereas if i ≠ j the flow is interregional either within Spain or from (to) Spanish region i to (from) a foreign country. Although our paper focuses on internal flows within Spain, in line with certain relevant references (Agnosteva et al. 2019), our dataset includes international flows for each Spanish region. More specifically, following this last reference, we introduce international trade in an aggregate way, considering the exports (imports) of each Spanish region to (from) Portugal and France (the two border countries), in addition to their exports to the rest of the world, divided in rest of the EU and other countries.
The T ijt variable is used in generic terms and thus can be used both for modelling exports ( Exp ijt ) and imports Imp ijt .
The variable lnDIST ij measures the logarithm of the geographic distance between locations i and j. To capture the positive effect of adjacency, we introduce two dummy variables: ADJREG equals 1 when two Spanish regions share a border and equal 0 otherwise; ADJCOU equals 1 when a Spanish region and a foreign country share a border and equals 0 otherwise. The last two variables conveniently aim to control for larger inter-regional trade flows between contiguous Spanish regions, as well as for the higher concentration of trade between regions of Spain and other neighbouring countries.
We then include two additional variables necessary for the estimation of the home bias. OWNREG is a dummy variable that equals 1 when the trade is intra-regional and 0 otherwise; that is, it equals 1 if i = j. This variable is a suitable control for the potentially different nature of flows within and between regions within Spain. SPAIN is a dummy that equals 1 for trade between two Spanish regions and 0 for international or intra-regional trade (SPAIN equals 1 if i, j ε SPAIN and i ≠ j). The home bias is thus given by the antilog of the difference of coefficients β 1 and β 2 [exp(β 1 − β 2 )], measuring how many times intra-regional trade exceeds inter-regional trade. The external border effect is then given by the coefficient β 2 alone, capturing instead how many times interregional trade exceeds international trade.
We use several measures of geographical distance. For the modelling of intranational trade, intra-regional and inter-regional distances are borrowed from Llano et al. (2010). The latter paper assumes that the distance travelled by trucks (surveyed by the EPTMC official survey on road freight in Spain) is a good approximation to the distances between provinces (Nuts3) within the Iberian Peninsula. The actual distances which are time-invariant distance measures (as common found in the literature) are averaged for every i-j pair across the whole-time window. For the islands (Canary and Balearic), we make use of the actual distance between these and the main ports on the Iberian Peninsula, as well as the inner distance between the ports and each of the capital city of landlocked provinces in Spain. Geographical distances between the eighteen Spanish regions aggregated at the Nuts 2 level are obtained as a weighted average of the distances between the provinces (Nuts 3), with provincial populations serving as the weights. For international deliveries, we use two different STATA commands in the computation of distances. First, we estimate travel distance by road using the 'georoute' command (Weber and Péclat 2016). Second, we use the 'geodist' command (Picard 2010) to obtain geodetic distances between the Spanish provinces and countries not linked by road. As trade with those countries is possible only by aircraft or ship, this measure appears a reasonable proxy for the real travel distance. Equation (1) also includes the other variables X it , X jt , which relate to the exporting (i) or importing (j) region (country) characteristics, to control for different factors that may affect transaction costs and the magnitude of flows between regions. For example, we include a dummy indicating whether regions are islands (Balearic or Canary Islands) or have a 'special' tax system (Navarre and the Basque Country). Moreover, as we will discussion the paper's final section, we also include additional variables relating to the quantity and quality of regulation set by sub-national governments. The monadic variables fit in X it , X jt , while the dyadic ones, relating more closely to the quality of regulation, are explicitly included as QUALREG ijt.
The terms μ it and μ jt correspond to multilateral-resistance fixed effects for the origin-time and the destination-time region, respectively. Their inclusion follows Anderson and van Wincoop (2003) and Feenstra (2002) and is meant to control the competitive effects of non-observable effects on partner regions and alternative destinations. All models include a year fixed effect ( t ), while some require an additional dummy, CRISIS, for the height of the financial crisis ( years 2007-2009). We also cluster the estimations by region-pair effects.
Following the state of the art in estimating the gravity model with zero flows (Agnosteva et al. 2019;Head and Mayer 2014;Tenreyro 2006, 2011), the equation adopts a panel data approach using the Poisson pseudo-maximum likelihood technique (PPML). 2 The number of zeros in our sample is not specially big. There are 145 zero flows within the interregional flows (out of a total of 6256, that is a 2%). There are no zero's in the intra-regional flows (391 nonzero observations) and the international sample finally used (3128 observations). In sum, 145 zero's for 9775 observations in the whole dataset (1%). Even when the number of zero's is not large, the PPML serves to sort out Jensen's inequality problem (note that the endogenous variable is in levels) and produces unbiased estimates of the coefficients by solving the heteroskedasticity problem. Because of that, it is now common to include PPML and OLS estimations as a robustness check, something that we apply in our empirical analysis. By doing so, we also expect to increase the comparability of our results with other previous and forthcoming papers, obliged to use PPML estimators since they use sector-specific flows , or higher levels of granularity in the spatial dimension Llano 2014, 2015;Requena and Llano 2010;Garmendia et al. 2012). Further details on the model variables are provided in the following sections and in the Electronic Supplementary Material, where we report the results using OLS pooled regressions with the corresponding FE.

Data
There are no official data on region-to-region trade flows for any country in the EU. In this paper, we use a unique dataset that captures region-to-region intra-national trade flows within Spain. We draw from data for the period 1995-2017 (C-intereg project, www.c-inter eg. es) for the country's seventeen regions (Nuts 2). 3 Llano et al. (2010) provide details of the estimation method for the historical sample (1995)(1996)(1997)(1998)(1999)(2000)(2001)(2002)(2003)(2004)(2005)(2006)(2007), which relies mainly on a full set of freight datasets by transport mode and product type, mixed with product-specific price vectors, and the corresponding constraints at the national and regional level, in terms of both output and international trade. The whole dataset has the virtue of ensuring coherence with production data at the national and regional level for each year and includes refinements to avoid headquarters effects and re-exportation schemes within the country .
As we have pointed out, and in line with previous papers (Requena and Llano 2010;LeSage and Llano 2013;Gallego and Llano 2014;Agnosteva et al. 2019), our dataset also includes international flows from/to each region and the world's main countries. This international trade data come from the Spanish Tax Agency (Dirección General de Aduanas). This database will be combined with a range of different variables that attempt to capture regulatory distortions in the Spanish regions. Variables from alternative sources are considered in our empirical exercise: (1) 'Market Unity Distortions' variables published by the CEOE (the national employers' association), (2) number of pages in Official Journals and number of rules by each region from Marcos et al. (2010) and (3) 'Quality of Regulation' indicators from the EOEE (INE). All these measures are explained in depth in the following sections.
We present in the Electronic Supplementary Material a full set of tables with the main statistical measures of the variables as well as the correlation matrix among the variables for the entire period analysed , along with the ones for a shorter period (2013-2017), for which the regulatory variables from the EOEE are available.

Measuring regional home bias
This section reports and discusses the results from the gravity model for Spain derived from the benchmark classic model (PPML). In Table 1, we report the results of gravity-model estimation for total regional flows. This section focuses on the results reported in the first two columns (Column 1 represents exports and Column 2 imports).
The econometric results show, as expected, that the sign of the OWNREG variable is positive at a 1 percent level of significance, and the size of the coefficients is similar for exports (3.430***) and imports (3.418***). The SPAIN variable's coefficients are also similar for exports (2.295***) and imports (2.294***). We include a column with the home bias at the bottom of the table, computed as [exp [OWNREG-SPAIN]. The results show that the factors for exports (3.11) and imports (3.08) are very similar, indicating that on average Spanish regions trade around three times more often with themselves than with other non-contiguous regions or countries. This border estimate is on the lower bound of what previous studies have estimated (Requena and Llano 2010;Gallego and Llano 2014). Table A5 of Electronic Supplementary Material presents a robustness analysis using the OLS gravity estimation and shows similar results in terms of signs and significance of the coefficients.
In line with expectations and the previous literature (Requena and Llano 2010), we find a negative and significant relationship between trade-flow values [corrected by the GDPs of the trading partners] and geographic distance between trading partners. The size of the coefficient is around -1 and is statistically significant at 1%.
The coefficient of ADJREG is also positive and significant, as regions tend to trade more with adjacent regions than with otherwise similar regions. However, the effect of the external contiguity variable, ADJCOU, is not statistically significant. The results on the gravity-equation estimation models' main variables for imports or exports do not yield qualitatively different results.
We estimate the equation separately for each year in order to detect changes on the home bias. Figure 1 illustrates our estimates of the home bias over time, showing that it has increased since the crisis, peaking in 2014 and then slowing down and stabilizing at high levels again. This is apparent for exports and imports.
In Fig. 2, we illustrate the variation in the estimate of the home bias across regions in Spain (as a result of estimating region-specific gravity equations), from both the exports and the imports side, and always controlling for international flows.

How is intra-national trade affected by regulatory distortions?
With the previous findings in mind, we now focus on the role of regional regulation in the fragmentation of Spain's market. We consider three alternative sources, although we focus on the last two to extend the gravity model. First is the inventory of 'Market Unity Distortions' published by the CEOE (the national employers' association) in 2012. This source provides detailed examples of barriers to market unity on a sectoral basis. However, it does not enable us to reliably measure the degree of change in market fragmentation over the years, sectors, or regions; this limits any quantitative analysis of causality.
Drawing from the CEOE information, Fig. 3  Each region has evolved differently, reflecting on the influence of many factors and reaching different levels of self-government. Indeed, firms look to the Official Journals of the jurisdictions in which they operate to determine the applicable rules. Therefore, it is plausible to relate this to the burden imposed by those rules. Moreover, the compliance costs that firms incur arguably bear a direct relationship to the amount of legislation and regulation adopted. Figure 4 shows the correlation between the Market Unity Fragmentation indicators identified by the CEOE by region and the two main indicators reported by Marcos et al. (2010), both in the last year available: 2008. In both cases, the number of pages in regional journals 6 (Panel A) and the number of norms and dispositions (Panel B) positively correlate with our previous measure. Note that the regulatory measures by Marcos et al. (2010) are available on an annual basis, but the CEOE's measures are available only for one point in time (2012).
Having described these two sources of information, we re-estimate our gravity equation, adding the last indicators described.
The results are reported in columns 3 (exports) and 4 (imports) of Table 1. Our analysis is restricted to 1995-2008, a period for which we have overlapping data on regional regulations and trade flows. We find that the variable '# Rules j ' has a negative and significant coefficient (1%) for exports. The sign of the coefficients for '# ▸ 5 These indicators are aimed to capture regulatory intensity (not regulatory quality) and the extent to which Spanish Self-Governing Communities (SGCs) or Comunidades Autónomas have exercised their legislative and regulatory powers since the late 1970s. While it is difficult to establish an objective and accurate measure of regulatory intensity, the Spanish decentralized State provides a unique basis in which to shape an indicator that can capture the variations in the SGCs' exercise of legislative and regulatory powers and that enable objective comparisons. Decentralization in Spain was aimed at transferring powers from the State to smaller, regional entities. However, not all the regions have achieved the same level of devolution. 6 A limitation of these measures is that they do not relate only to regulatory burdens on business activities, as things other than rules are published in the official journals (e.g. procurements, announcements). However, it is assumed that even the implementation of changes in the organization of public administration, as well as judicial announcements and other notices, can be related to the direct and indirect costs imposed on businesses. In this regard, it is interesting to analyse changes in the volume of regional official publications over time. More rules imply higher regulatory intensity, although some laws or regulations will be related not to business or economic activities but to broader administrative and organizational issues.

A pages in regional journals (Marcos, 2010) & # market unity distortions (CEOE 2012) B pages in regional norms (Marcos, 2010) & # market unity distortions (CEOE 2012)
Pages i ' and '# Pages j ' is also negative and statistically significant. On the import side (column 4), the coefficients obtained are like those for exports. The results suggest that trade between any pair of regions is reduced when the trading partners present higher regulatory intervention levels (especially when measured in terms of number of pages). This finding is consistent with the idea that interregional trade would decrease in response to barriers imposed in other regional markets. Regulatory intensity indicators do not necessarily refer to economic issues but are proxies for the level of interventionism in each region.
The estimated home bias for the specifications that include regulatory intensity measures (columns 3 and 4) is positive and significant and is now higher (3.87 and 3.77 vs. 3.11 and 3.08), suggesting that these regulatory differences do explain part of it. The distance still shows a negative and significant coefficient, and the contiguity dummy also presents a positive and significant coefficient, all as expected.
Finally, we analyse our trade database along with several indicators reported by the EOEE (INE) regarding the 'Quality of Regulation' faced by the firms of each region (Nuts 2) operating in three broad sectors: Industry, Trade (wholesale and retail), Transportation and tourism. This dataset contains several qualitative measures of the surveyed firms' perception of their economic and institutional environment. Of special interest to us are questions relating to the quality of regulations affecting a firm's activity in each region and sector, differentiated by regulatory type (national, regional, and local). The dataset explored here is characterized by further granularity capturing region-sector-year variations.
We should begin with a word of caution, by saying that none of the information reported by this new source exactly match the research question of this article since they do not differentiate how each firm perceives the effect of regulations in its own region and each of the partner regions. Thus, it is not possible to produce a cause-effect analysis to identify how the introduction of a specific regulation at home or in any other Spanish region might affect intra-and inter-regional flows of goods. 7 However, they offer valuable information on the likely importance of the regulatory framework and how it may affect the size of the home bias. After testing alternative combinations, 8 we settled on the following variables: 7 Note that this impact might affect the firm producing an exporting capacity, for example, by raising its operating costs, or reducing the penetration capacity and the mark-ups. 8 The survey provides answers for each of the sectors reported in each of the Spanish regions (Nuts2). First, we used the information to generate origin-specific and destination-specific monadic variables. The results are provided in the Electronic Supplementary Material (Tables A9-A11) and were considered as less clear than those for the current definition of the variables, which are dyadic (_ij) for each trading pair. Such dyadic variables are built by interacting the monadic variables of every two trading partners ij. Moreover, given the almost symmetric results obtained in the previous section for exports and imports, we opt now to focus just on exports and to define the regulatory indicators in a dyadic format. We have also used alternative definitions of the variables, expressed in relative terms with respect to the mean, or proving different interactions between those capturing 'magnitudes' of relevance of the regulatory framework (eea2_*_ij) and those capturing 'perceptions' (br11_*_ij; br12_*_ij; br13_*_ij; br21_*_ij; br22_*_ij).

Variables defined with the answers given by all firms ('All sectors': _6_): eea2_6_ij: Effects of the evolution of 'Economic Regulation' on your firm. br13_6_ij:
Perception of the evolution of the resources dedicated to resolving procedures with the administrations corresponding to the Local Government. br21_6_ij: Perception of the evolution of added procedures that must be carried out to operate with different regions.
We then proceed to implement a sector-specific analysis using equivalent variables to the three defined above, which now have values for the sectors that are more directly connected with our trade flows of goods within Spain. Note that although our interregional trade dataset considers only flows of goods, the quality of regulation dataset covers both goods and services. 9 Industry (_1_): We compute three variables, labelled eea2_1_ij; br13_1_ij; br21_1_ij, whose definitions for the most part match those of the previous three. The only difference is that these refer to firms belonging only to the industrial sector (_1_) and not to all sectors (_6_). Given that industry produces most of the goods traded in our dataset (along with agriculture), these three new variables are intended to capture the impact that regulatory quality (national, regional, local), given that it affects the industrial sector (alone), on the performance of firms trading industrial goods.

Trade (Wholesale and Retail) (_3_):
Here, we build a set of three equivalent variables capturing the effects that the perception of regulation has on the performance of firms in the 'Trade' sector. Although these firms are service providers, and their output is therefore not directly considered in our data on interregional trade of goods, it is reasonable to assume that the quality of regulation affecting wholesalers and retailers within Spain will be affecting the supply of goods. For example, the imposition of highly restrictive regulations with respect to commercial schedules or labelling (see Table A.1 and A.2 in the Electronic Supplementary Material for real examples of distortions reported in Spain) may affect the flows of goods delivered, with potential destruction and deviation effects. Such effects may or may not reflected in the home bias at the regional/sectoral level. These variables are labelled eea2_3_ij; br13_3_ij; br21_3_ij.
Transportation and tourism (_4_): Finally, we build another similar set of variables centred on regulation affecting firms in Spain's 'Transportation and tourism' sectors. These variables are labelled eea2_4_ij; br13_4_ij; br21_4_ij. 9 In addition to these three variables, we also considered other three complementary ones: br11_6_ij (Central Government regulation); br12_6_ij (Regional Government); br22_6_ij (municipalities within your own region). The final version of the paper discards including all of them, due to multi-collinearity problems (see Tables A3-A5 in the Electronic Supplementary Material). The selected variables eea2_*_ ij, br13_*_ij, and br21_*_ij show low levels of correlation, especially when only intra-national observations are considered ( In this case, we also assume that certain regulations affecting firms in a region's transportation sector may stimulate or restrict certain flows of goods (i.e. intraregional) in detriment of others (long-distance flows that required the use of heavy trucks or multi-modal deliveries), ultimately affecting the intensity of trade and the home bias. 10 Before analysing the econometric results, it is convenient to briefly review the EOEE regulatory indicators. Figure 5 maps the average home bias for each region in the period 2013-2017, along with the average values of the three main indicators considered in addition to three scatterplots. The scatterplots show that eea2_6_i and br13_6_i have a positive relationship with the regional home bias, while br21_6_i has a negative one. The emerging results offer interesting insights in relation to the home bias. For example, in the first two, it can be seen that the regions marked in red (with the exception of Navarre and C. Valenciana in br13_6_i) are the ones with lower income levels, while the ones in green are the richest ones. Extremadura, Castilla y León, Castilla-La Mancha and Galicia appear on the top of the ranking for br13_6_1, as regions with the most negative perception about the level of overregulation at the local level, which is unsurprising given the large size of their territory and the high level of atomization of their municipalities. Regarding br21_6_i, Madrid stands out as the region with the most negative perception in terms of overregulation when operating with different regions. This is something that can be interpreted in the light of the higher level of concentration of multinationals and multi-plant Spanish firms, headquarters and business federations in the capital city of Spain, which are particularly sensitive to the rise of legal barriers across the whole of the Spanish territory. In contrast, the negative sentiment associated with overregulation is less striking in in the Basque Country, Navarre, Andalucía or even in Cataluña, although less clearly in this case. This asymmetric perception appears reasonable when considering that the barriers faced by Madrid (usually ranked as one of the most pro-free market in the country) when operating in these other highly competitive and regulated regions, are higher than in the opposite direction. Finally, it is worth highlighting the case of Extremadura, which represents an extreme case in terms of home bias in all scatterplots. Table 2 shows the results of estimating the gravity equation augmented with our preferred indicators of regulatory quality. To avoid the potential problems of multi-collinearity mentioned above, we estimate the model separately for each of the sectors for which regulatory information is available. In the correlation matrix, it is apparent that the variable 'SPAIN' is strongly correlated with the regulatory variables. To check that there is not a multi-collinearity problem, we complement this table with a second estimate (Table A7 in the Electronic Supplementary Material) using only intra-national observations. The results obtained after this robustness   (4) to (6) include the sector-specific variables ordered in blocs. For brevity, the analysis focuses on export flows, given that the new indicators are expressed as dyadic variables. First, it is interesting to highlight that the R 2 of all models exceeds 92%. Also, the coefficients for the main variables related to gravity remain statistically significant and have the expected signs. The home bias (bottom part of the table) remains at similar values as shown in column (2) corresponding to the period considered (2013)(2014)(2015)(2016)(2017) and is larger than for the whole sample (column 1).
Second, the set of regulation quality measures yields the following results: • eea2_*_ij has a significant and positive coefficient when considering the 'Industry sector', the 'Trade sector', and the 'Transportation & Tourism sector', indicating that the intensity of interregional trade increases when firms report the 'Economic Regulation' affecting their performance. Note that this variable is defined broadly-as it includes all types of regulation: international, national, regional, local, and sectoral-and does not necessarily carry negative connotations. The coefficient is not significant when considering all sectors [column (3)]. • br13_*_ij coefficient is positive and significant in the 'Trade sector' and 'Transportation & Tourism sector'. The estimated coefficient indicates that interregional flows of goods increase when firms perceive a rise in resources dedicated to resolving procedures with the Local Government. The results can indicate that a rise in the local government's legal procedures in general acts as a pull factor in favour of higher interregional flows. • br21_*_ij has a non-significant coefficient considering the PPML estimations. In the case of the OLS estimations (Table A6 of Electronic Supplementary Material), the coefficient is negative and significant for 'All sectors', 'Trade sector', and 'Transportation & Tourism sector', which is suggestive that the intensity of trade between Spanish regions decreases with the perception of the additional procedures to be carried out with different regions. This result indicates that interregional trade of goods might decrease when firms in all sectors (goods and services) perceive a rise in the burden of regulation necessary to operate with different regions. This result also emerges in the case of firms in the trade and transportation sectors.

Alternative specifications addressing spatial and network effects
This section discusses the methods and results obtained by implementing a battery of alternative specifications of the gravity equation, which seek to controls for econometric issues such as cross-sectional dependence. In summary, this growing literature considers two alternative approaches: (1) the first one (LeSage and Pace 2008) defines spatial-gravity equations, where one (or more) spatial terms enter in the gravity equation as a new element. This implies estimating the value of a parameter , which captures the spatial effect of the origin regions, the destination regions and/or both at the same time; (2) alternatively, other authors (Chung 2008;Chun and Griffith 2011;Fischer and Griffith 2008;Metulini et al. 2018;Sellner et al. 2013) opt for applying a spatial filtering process to the trade flows before applying the preferred standard gravity approach in a second stage. As shown recently (Patuelli and Arbia 2016), both approaches are powerful and can be complementary. None of these are currently available on the standard econometric packages, so one needs to rely on his/her own programming or on the contribution of these authors. In our case, as the code borrowed is applicable to cross-section datasets, we had to aggregate flows across specific time-windows, which is a standard procedure as an alternative to the use of long panels (Klasing et al. 2015;Head and Mayer 2014). Moreover, the use of W matrices also imposes the need to use samples considering n*n interregional flows, this excluding international flows for which some variables are not available, and neither allow the equivalent treatment of spatial autocorrelation.
Our benchmark spatial model is defined in Eq.
We use a generic element T ij to denote the dependent variable, since in some cases this will corresponds to the logs of the interregional exports or can enter as the corrected T ij,t Y i,t Y j,t element considered in our non-spatial specifications.
In this case, the spatial effects are captured by including a spatial lag of the dependent variable ( WT ij ), where W represents a spatial weight matrix. In this first specification, we just consider one single spatial weight matrix W spa . The scalar parameter ρ denotes the strength of spatial dependence in flows, and when this parameter takes a value of zero, the model in Eq. (2) becomes the independent regression model. The rest of the variables are included as follows: 'OWNREG', 'ADJREG' and 'LnDist ij ' are the same as in the non-spatial specifications; we use X i , X j and X ij as general terms containing different monadic and dyadic explanatory variables not explicitly defined before. We do so in a way that some specific variables will be included in certain models and not in others, for example, with respect to the different indicators related to sub-national regulation.
Be going further, it is now convenient to focus on the definition of the W matrices. In a typical cross-sectional model with n regions, where each pair of regions represent an observation, spatial regression models rely on an n × n non-negative weight matrix that describes the connectivity structure between the n regions. For example, we have W ij > 0 if region i is contiguous to region j. By convention, we set W ii = 0 to prevent an observation from being defined as a neighbour to itself, and the matrix W is typically row-standardized. In the case of bilateral flows, where we are working (2) with N = n 2 observations, Pace (2008), Chung (2008), Chun andGriffith (2011), andGriffith (2008)  = I n ⊗ W s . represents an N × N spatial weight matrix that captures connectivity between the importing region and its neighbour W spa i = W s ⊗ I n is another N × N spatial weight matrix that captures connectivity between the exporting region and its neighbour. 11 Besides, following previous literature (Sellner et al. 2013;De la Mata and Llano 2013), we want to consider an additional structure for the cross-sectional autocorrelation, which in this case will depend on how similar is the perception of the surveyed firms with respect to the regulation. Such structure could be similar or not to the spatial contiguity, and might capture complementary network relations not purely driven by the geography. It could be explained, for example, by common unobservable political-regulatory linkages. To do that, we consider an alternative element W regul = W regul j + W regul i , where W regul j = I n ⊗ W R represents an N × N regulatory network weight matrix that captures connectivity between the importing region and its neighbour, and W regul i = W R ⊗ I n is another N × N weight matrix that captures the regulatory proximity between the exporting region and its neighbour. Empirically, we consider two alternative ways of computing W R , which in both cases are built using the information corresponding to eea2_6_i, br14_6_i and br21_6_i, the ones that appeared to be more significant in the first part of the analysis. The two approaches are the following: (1) The first approach ( W R1 ) computes the similarity in the perception of regulatory framework affecting ones activity obtained in every pair of regions. As described in Eq.
(3), such measure compares in absolute terms how different the regulatory perception is, regardless of whether the perception is more positive or more negative: where RS ij refers to the regulatory similarity between regions i-j, RP to the mean regulatory perception in each region by each one of the indicators previously discussed, indicated by the subscript 'r'. Finally, 'R' refers to the total number of regulatory perception variables used. The indicator is then normalized using the min-max normalization, as follows: where ' min RS ij ' and ' max RS ij ' refer to the minimum and maximum levels of regulatory similarity in the sample. We finally subtract the resulting indicator to the value 1. By doing so, regions with values closer to 1 may be interpreted as regions with a high similarity in their regulatory perceptions. In contrast, values closer to zero will correspond to regions with the greatest disparity in their regulatory perception.
(2) The second approach will generate a matrix W R2 ., where we capture how the importing region has a more (or less) favourable regulatory perception than the exporting region. This alternative W R2 . matrix is computed following Eqs. (5-6): The indicator is also normalized by using the min-max normalization: In this case, the closer the value is to 1, the higher the distance between a favourable perception of the regulatory framework in the importing region in comparison with the most negative perception in the exporting region. Conversely, values closer to zero will mean that the importing region has a worse regulatory perception than the exporting region.
In all cases, following the standard convention in spatial econometrics, the corresponding weight matrices are row-standardized and the main diagonal elements of the spatial and regulatory weight matrices are set to zero, indicating that a region cannot be neighbour of itself.
Once these alternative W matrices have been defined, we continue describing our alternative specifications, some of which are able to combine two different W at the same time.
For example, following Sellner et al. (2013, Eq. 13-16), we define in Eq. (7) a spatial autoregressive Poisson gravity model (SPPML), able to deal with large numbers of zero flows. Although, as commented previously, our current dataset does not include many of these values, this alternative specification is very useful in comparison with the PPML FE panel data estimator which is currently considered as the benchmark in the non-spatial-gravity equation: For Z, we have the same explanatory variables than in the non-spatial Poisson model described in Eq. (1). Note that the model described in Eq. (7) considers two different weight matrices W 1 and W 2 . In a first specification, following Sellner et al. (2013), each matrix captures the effects affecting the dependent variable and the disturbance and is defined as follows: (1) W 1 = W spa i ; W 2 = W spa j . Then, we re-estimate this model using: (2) W 1 = W spa ; W 2 = W regul(R1) ; (3) W 1 = W spa ; W 2 = W regul(R2) .
Next, following De la Mata and Llano (2013), we define in Eq. (8) an alternative specification based on the general spatial model (SAC) described in LeSage and Pace (2009, p. 32), which considers cross-sectional dependence in both the dependent variable and the disturbances: As in the previous specification, we use two different weight matrices W 1 and W 2 , using the same combinations discussed for the Poisson.

Results for the spatial models
This section analyses the main results obtained with the spatial models. For brevity, we focus on the ones corresponding to the more recent time period (2012-2017), for which the new indicators about the perception of regulation are available (Table 3). In addition, the results for the first set of variables related to regional regulation (#Pages; #Rules) are reported in the Electronic Supplementary Material (Table A8 of Electronic Supplementary Material), distinguishing between the two time periods for which such indicators are available : 1995-2008 versus 2009-2012. Column (1) in Table 3 corresponds to an OLS estimation without fixed effects. The R 2 value obtained is below the ones for the PPML and OLS estimators using the pooled regressions with the fixed effects ( Table 2 and Table A6 of Electronic Supplementary Material) and similar to the most basic OLS version of the gravity (Table A8 of Electronic Supplementary Material). This illustrates how the use of the panel data and the fixed effects contribute to improve on the explanatory power. The coefficient for the OWNREG and ADJREG is positive and significant, with values similar to previous specifications. The coefficient for the log of the distance is negative and significant, but smaller than the one observed with the panel data. As in the PPML estimates, none of the (average) regulatory variables eea2_6_ij_a, 12 br13_6_ ij_a, br21_6_ij_a are significant in this OLS cross-section set-up.
Model in (2) reports the results for the SAR model. The coefficient for the OWN-REG and ADJREG remains positive and significant, with little variations with respect to (1). Unexpectedly, the coefficient for the log of the distance is not significant, while the spatial autocorrelation term, ρ 1 , reaches a positive and significant (8)  (3) corresponds to the Poisson model using the two spatial weight matrices: the one for the origin and the one for destination ( W 1 = W spa i ; W 2 = W spa j ). Note that in this case, the dependent variable is defined in levels, the standard procedure when using PPML. In this case, the R 2 rises to 0.86, and the estimated coefficients for most of the variables remain closer to what we observed in the panel data estimations (Table 2): the coefficient for the log of distance is −1.39, while the ADJREG becomes non-significant. The coefficient of OWNREG is significant, but the factor of Home Bias drops to 2.7. Regarding the spatial effects, just the one corresponding to the destinations (ρ 2 ) is marginally significant and negative.
Then, column (4) reports the results for the SAC, also using the two spatial weight matrices considered in (3). In this case, the coefficient for the distance drops to a significant -0.66, obtaining positive and significant results for OWNREG and ADJREG, in line with the previous SAR and the PPML. In this case, the two spatial effects, ρ 1 and ρ 2 , are positive and significant. Moreover, all the regulatory variables become significant, obtaining positive coefficients for eea2_6_ij_a and br21_6_ij_a, and negative for br13_6_ij_a.
The next specifications (5-10) replicate the previous Poisson and the SAC, but using different combinations of the spatial weight matrix with the two versions of the regulatory proximity matrix. In the case of the Poisson specifications in (5) and (8), the cross-section autocorrelation terms are non-significant, while the variable br21_6_ij_a becomes highly significant and negative. In (6) and (9), the SAC using W 2 = W regul(R1) and W 2 = W regul(R2) , the cross-section autocorrelation terms are also non-significant, as also are all the regulatory variables (eea2_6_ij_a, br13_6_ij_a, br21_6_ij_a). In contrast, the SAC models corresponding to (7) and (10) yield a significant and positive cross-section dependence term (ρ 2 ), and overall robust results for the coefficients of the regulatory variables eea2_6_ij_a and br13_6_ij_a, being the first positive and significant, and the second, negative and significant.
These results suggest that the performance of the OLS (1), SAR (2), SAC (6) and SAC (9) is in line with the ones of the panel PPML regarding the lack of significant effects concerning the regulatory variables. In contrast the Poisson (3), SAC (4), SAC (7) and SAC (10) provide evidence of significant effects for such variables, as in the case of the PPML panel with eea2_4_ij when modelling the sectorial perception of regulation in industry, trade and transportation.

Conclusion
In this article, we provide up-to-date estimates of internal border effects in Spain, using a gravity model and the largest panel available with data on inter-regional flows in Spain . We measure this effect in terms of home bias, estimating how many times a region trades more with itself than with other (non-adjacent) regions of Spain, while controlling for a wide range of factors. We also estimate the extent to which the home bias varies across regions and over time, finding some evidence of an increase in the aftermath of the Great Financial Crisis.
We then combine our trade dataset with several indicators of the prevailing quantity and quality of regional regulation. There are some regions for which we estimate a lower home bias, which also present lower levels of market unity distortions. This is the case, for example, of regions such as La Rioja, Navarra and Murcia. Then, we have Cataluña, where the estimated home bias is relatively low too but continues to present intense regulatory activity and high levels of market fragmentation. This is also the case with Andalucía, although the level of regional interventionism in this region appears lower than in Cataluña. Extremadura is the region with the highest estimated home bias, which at the same time also shows high levels of market distortion.
The analysis focussed in the period 2013-2017, using novel indicators of the effect of regulation on the performance of firms, suggests that both the quantity and the quality of regulation at the national, regional and local levels may affect the flows of goods between and within regions. This is the case mainly when the analysis considers the effects of the regulations in different sectors. It is interesting to observe that the quality of regulation affecting some service sectors has heterogeneous effects on the intra-national trade flows of goods.
Finally, the paper has made a small methodological contribution to the literature, by comparing the results obtained with the panel fixed effect specification (PPML and OLS) with those from for a range of nine spatial-gravity specifications, using different weight matrices.
The results emerging from these robustness checks are remarkable. In some cases, they confirm the results from using panel data and fixed effects specifications, while in other cases provide contrasting results. Such differences are probably driven by the lack of comparability between the panel data and cross-section set-ups, as well as the short range of variability in the regulatory variables.
From a policy point of view, these results clearly suggest that removing barriers to commercial transactions across regions should enable firms to grow and become more competitive. 13 However, we need to bear in mind that some of these regulations are often needed to protect other goals, such as the quality of the environment, the public infrastructures or the local culture and businesses, sometimes exposed to the pressure of a global culture that involves the rise of multinationals. In line with the most recent initiatives regarding the fulfilment of the Single European Market, our paper suggests that a more holistic approach could bring important benefits, as it is not just based on national regulations and the free trade of goods, but considers multi-level and cross-sectoral measures. The lack of reliable statistics available to capture the coherence of this type of multi-level regulatory framework, in both Spain and at the European level, indicates that this approach would require of further development. The COVID19 crisis is also teaching important lessons on how sub-national regulation which, in principle, are established to protect the public good and are fully backed by democratic procedures, can introduce stringent barriers of mobility and trade. It is evident that efficiency cannot be the sole consideration when it is in conflict with other social ideals such as the security, the health, the environment or certain cultural values (local languages, customs, etc.). Most likely, the optimal balance will ultimately rely on the goodwill of regulators, assuming that they follow the principles of simplicity, cooperation, openness, sustainability and reciprocity at all territorial levels.
Undoubtedly, a limitation of using region-to-region flows is that a high level of fragmentation does not necessarily imply a reduction in overall trade. Future research-with micro-data, if possible-should carefully examine the effects of lack of market unity on the cost structures, prices, profitability and productivity of Spanish firms.