Estimating the Trade and Welfare Effects of Brexit: A Panel Data Structural Gravity Model

This paper proposes a new panel data structural gravity approach for estimating the trade and welfare effects of Brexit. The suggested Constrained Poisson Pseudo Maximum Likelihood Estimator exhibits some useful properties for trade policy analysis and allows to obtain estimates and confidence intervals which are consistent with structural trade theory. Assuming different counterfactual post-Brexit scenarios, our main findings suggest that UKs (EUs) exports of goods to the EU (UK) are likely to decline within a range between 7.2% and 45.7% (5.9% and 38.2%) six years after the Brexit has taken place. For the UK, the negative trade effects are only partially offset by an increase in domestic goods trade and trade with third countries, inducing a decline in UKs real income between 1.4% and 5.7% under the hard Brexit scenario. The estimated welfare effects for the EU are negligible in magnitude and statistically not different from zero.


Introduction
On Thursday, 26th of June 2016 the United Kingdom (UK) held a "Brexit-referendum" and the majority of the participating electorate voted in favor of the "leave choice". As a consequence David Cameron resigned as prime minister and Theresa May took over office. On the 29th of March 2017, the government of the UK officially handed in a letter in Brussels notifying the country's withdrawal from the European Union (EU) triggering Article 50 of the "Treaty on European Union". This initiated a two year time window for the conclusion on a withdrawal agreement. Since then the UK and EU are negotiating the terms for UK's withdrawal. On Friday, 8th December 2017, both parties announced sufficient progress on phase one negotiations dealing with issues related to citizens' rights, UK's "divorce bill" and the Irish border for paving the way for discussions on the future trade relationships.
During the period of political campaigning prior to (and also after) the referendum, the likely economic costs and benefits induced by Brexit for both the UK and the EU have been highly debated. Given the fact that the negotiators are still far away from reaching a final agreement on all involved issues, an (ex-ante) estimation of the involved costs and benefits is naturally surrounded by substantial policy uncertainty. Nevertheless, some economic studeis tried to provide estimates on the costs and benefits by focusing on different economic issues. Thereby, the potential effects of Brexit for bilateral trade between UK and the EU and domestic welfare in both economic areas attracted the most attention among economists and policy makers alike. With only one exception, all available analyses point to a (maybe substantial) reduction in bilateral trade between the remaining 27 EU member states and the UK as a consequence of Brexit. This decline in economic interactions would be accompanied by negative domestic welfare effects for both economic areas. The magnitude of these estimates differ depending on the estimation approaches applied, the data used and, most importantly, the counterfactual post-Brexit scenarios assumed. 1 This paper applies a novel approach for identifying the bilateral trade effects stemming from Brexit in a unifying framework in the spirit of Allen, Arkolakis and Takahashi (2014). In particular, we extend the Constrained Poisson Pseudo Maximum Likelihood Estimator (CPPMLE) as suggested by Pfaffermayr (2017) for panel data and account for full endowment general equilibrium effects as suggested by Yotov, Permantini, Monteiro and Larch (2016). The panel data CPPMLE features some advantageous properties which are useful for trade policy evaluation. First, the panel data CPPMLE is able to accurately address and solve the incidental parameter problem and thus allows to fully control for unobserved heterogeneity across country-pairs. This is achieved by exploiting the restrictions imposed by the system of multilateral resistances for estimation purposes (see Appendix A.3 for more details). Specifically, this approach delivers unbiased estimates for the standard errors of the slope parameters. Second, it allows to apply the delta method for calculating trade theory consistent confidence intervals which are important for accurately assessing the uncertainty involved when applying various alternative post-Brexit trade policy scenarios. This approach might be preferable as compared to routinely applied bootstrapping procedures. In the context of gravity models, bootstrapping the system of multilateral resistance terms together with the parameter estimates is computationally intensive and theoretical results on the reliability of the obtained confidence intervals are yet unavailable. With the data at hand and by applying the panel data CPPMLE, domestic trade flows are fully explained by the included pair fixed-effects together with the trade resistance terms as suggested by theory. As a consequence, all changes in international trade flows are measured relative to domestic trade flows.
The empirical specifications of the gravity model suggested in this paper allow for phasingin effects in counterfactual policy scenarios such as e.g., the conclusion of new bilateral free trade agreements by the UK. For this purpose, we follow Bergstrand, Larch and Yotov (2015) and apply a distributed lag structure as only considering contemporaneous trade policy effects likely only allows to identify lower bound estimates. Further, we allow for time trends in border effects. The paper also investigates the sensitivity of the obtained Brexit effects with respect to the empirical identification of the parameter estimates associated with trade policy measures. In the previous literature trade effects of EU membership are either identified by means of an average effect stemming from all existing regional trade agreements (RTAs) or by accounting for EU membership indicators. The former measure might be too broad in its definition as RTAs substantially differ in their respective depths concerning the degree of trade liberalization. In datasets capturing only recent time periods, the effects from EU membership seem to be driven by its eastern enlargement which might not allow to obtain good estimates for UKs (additional) trade costs induced by Brexit. As an alternative, this paper suggests to use information on customs unions for identifying the (direct) trade effects of Brexit and empirically compares this specification with the more commonly used one involving RTA indicators (only).
Most of the previous literature dealing with the trade effects from Brexit relies on different versions and time periods of the World Input-Output Database (WIOD) for estimating direct trade policy effects (see, e.g., Brakman, Garretsen and Kohl 2017;Dhingra, Huang, Ottaviano, Pessoa, Sampson and Van Reenen 2017;Felbermayr, Gröschl and Steininger 2017;Vandenbussche, Connell and Simons 2017). The WIOD mainly contains the most developed economies around the world which are very actively engaged in free trade policies. As a consequence, this data source lacks exploitable (time-) variation in policy indicators which makes it difficult to identify the causal trade effects of free trade agreements and/or customs unions. Furthermore, input-output tables are technically constructed in a way that the sum of the residuals for all trade relationships is zero. This is a very useful property for the representation of input-output relationships but constitutes a drawback for statistical inference as it puts specific restrictions on the error terms of any econometric model applied. For this reason, we rely on a different and unique dataset which combines various sources for bilateral trade, domestic trade and total production of manufacturing goods. 2 For assessing the trade and welfare effects we apply four different counterfactual scenarios. As mentioned above, we run two alternative empirical specifications of the gravity model using either customs union data together with information on free trade agreements (FTAs) or pool these two together into one single RTA indicator. These alternatives aim at assessing potential heterogeneity in the trade creating effects of custum unions versus FTAs. The usage of a single RTA indicator is more common in the Brexit literature, and thus the alternative specifications provide insights into the sensitivity of the obtained trade and welfare effects based on the choice of the empirical specification.
With regard to the potential outcomes of the Brexit negotiations we distinguish between a "hard-" and "soft-Brexit" scenario. For the former, we assume that the UK will not only leave the EU but also loses all current free trade agreements with third countries. Furthermore, this scenario assumes that no new free trade agreement between the EU and UK could be established. As a consequence, UK would trade with all countries in the world based on the World Trade Organization regulations. As a consequence of this scenario and in our data, the UK would be the only country not trading under any preferential agreements in force. The "soft-Brexit" scenario assumes that all existing trade agreements with third countries are inherited from the EU and remain in force. In the first empirical specification, the UK leaves the EU as a member of the customs union, but would trade with the EU under a newly established FTA. This scenario closely mimics the "Global Britain" strategy proposed by the current government of the UK. Since the second specification does not distinguish between customs unions and FTAs, the RTA indicator is set to zero for all bilateral trade relationships between the UK and any EU27 member state while the RTAs with third countries remain in force. For the hard Brexit scenario these bilateral trade agreements are additionally also set to zero.
Our estimation results reveal the following main findings: The trade distorting border effects substantially decline over time pointing to the importance of using panel data for trade policy evaluation. The cumulative RTA trade enhancing effect is qualitatively in line with the results offered by Bergstrand et al. (2015) but in quantitative terms somewhat smaller. This can be explained by the shorter time span covered in our data lasting from 1994 to 2012. A differentiation between customs unions and FTAs seems to be important as the former increases bilateral trade by a significantly larger amount as compared to the latter. As a consequence, relying on RTAs as a empirical combination of both customs unions and FTAs might not deliver a very accurate estimate for the trade effects stemming from Brexit.
The conducted counterfactual scenario analysis suggests that Brexit reduces EU-UK trade 2 The data sources are discussed in detail in the Appendix A.4 3 across all scenarios. This effect is substantially more pronounced for UK exports to the EU as compared to its imports from the EU. Not very surprising the largest negative trade effect would be induced by a hard-Brexit and when differentiating between customs unions and FTAs. In this scenario, our model predicts an expected decrease in UK (EU) exports to the EU (UK) by 35.5% (29.4%). In addition, our theory-consistent estimates also reveal substantial uncertainty involved in the estimation of Brexit effects. For the worst case scenario, the reduction in exports from UK to EU varies in a range between 25.3% and 45.7%. Furthermore, Brexit is estimated to exhibit "positive" trade diversion effects by increasing domestic trade in the UK and also from trade with third countries. Our model also identifies small but positive effects for intra-EU trade among the remaining EU27 economies. The total net effect stemming from "negative" trade creation and "positive" trade diversion is calculated via a standard measure for overall welfare effects. 3 Or results suggest that, as a consequence of Brexit, real income in the UK will decline in a range between (statistically significant) 0.3% and 5.7% while for the EU the estimated welfare effects are statistically never different from zero. This finding points to an asymmetry of the Brexit induced net costs to be borne by the UK and the EU, respectively.
The remainder of the paper is structured as follows: Section 2 summarizes the methodological approaches and findings from previous studies on the trade and welfare effects of Brexit. For comparability, we limit the discussion to contributions which rely on (structural) gravity model estimation. Section 3 presents the panel data structural gravity model while Section 4 discusses the empirical specification, details on the panel data CPPMLE, presents the data used and reports the estimation results from the gravity model. Section 5 details the findings from the alternative counterfactual Brexit scenarios assumed. In Section 6 we offer some concluding remarks and discuss the main policy implications.
2 The trade and welfare effects of Brexit: A brief review of the literature The scheduled referendum on UK's future membership status in the EU triggered a series of economic analyses which aimed at identifying the various costs and benefits of a potential win of the leave campaign. A detailed account of various potentially relevant economic dimensions such as e.g., trade, investment and productivity is offered by Baldwin (2016), Van Reenen (2016) and Sampson (2017). In the following, this section concentrates on scientific contributions which put the trade and welfare effects of the Brexit at the center of the respective investigations and applies (structural) gravity model estimation for studying counterfactual Brexit scenarios. Table 1 provides a brief overview of the reviewed studies displaying the various methodological approaches applied, the data sources utilized and the main findings reported.
The first series of ex-ante investigations into the potential trade and welfare effects of a leave vote in the Brexit referendum has been provided by national and international (governmental) institutions including the HM Treasury (2016), Kierzenkowski, Pain, Rusticelli and Zwart (2016) and the International Monetary Fund (2016). These studies are reviewed in more detail in Gudgin, Coutts, Gibson and Buchanan (2017). The estimated trade effects from Brexit are commonly based on ad-hoc formulations of gravity models which do not take any type of general equilibrium effects explicitly into account. The report prepared by HM Treasury (2016) Gudgin et al. (2017) comprehensively investigate the robustness of the findings from the above mentioned national and international institutions (i) by closely mimicking the approach taken by HM Treasury (2016) and (ii) varying the sample composition, the time span considered and the estimators applied. With regard to the latter, the authors alternatively also run their specifications relying on the Pseudo Poisson Maximum Likelihood (PPML) estimator which avoids biased estimates by explicitly accounting for zero trade flows and the inherently observed heteroscedasticity in bilateral trade flow data (Santos Silva and Tenreyro 2006). The findings of their robustness checks suggest that the quantitative trade effects from Brexit identified by the HM Treasury (2016) should be considered as upper bound estimates. However, all different sensitivity analyses carried out by Gudgin et al. (2017) also indicate negative trade effects Brexit for both the EU as well as for the UK.
A more structural approach for understanding both the short-and long-run welfare effects of Brexit has been proposed by a research team working at the London School of Economics and Political Science based Centre for Economic Performance (Dhingra, Huang, Ottaviano, Pessoa, Sampson and Van Reenen 2017). The authors apply a standard quan-  (2017). This study also differentiates between a hard and soft Brexit scenario closely following Dhingra et al. (2017). A hard Brexit would imply the application of WTO rules together with high non-tariff barriers (NTBs). The soft Brexit is defined as EEA membership including some NTBs (see Table 1 for further details on the scenarios). The 2014 input-output data from WIOD are used for estimation. The main findings of Vandenbussche et al. (2017) suggest that value added production in UK would decrease between 1.21% (soft Brexit) and 4.47% (hard Brexit), inducing job losses in the UK of around 140,000 to 530,000 jobs. In absolute terms a larger number of jobs would be lost in the EU27 ranging between 280,000 and 1.2 million jobs.
The recent contributions by Brakman et al. (2017) and Felbermayr et al. (2017) are most closely related to the work carried out in this paper. The former apply a structural gravity model for bilateral trade flows taking account for full endowment general equilibrium effects as proposed by Yotov et al. (2016). For this purpose, Brakman et al. (2017) estimate the gravity equation via PPML together with an iterative procedure which allows to estimate and counterfactually change both the multilateral resistance (MLR) terms and a country's income level (i.e., full endowment general equilibrium effects). The estimated parameters for calculating counterfactuals is based on information on bilateral trade agreements. This paper also investigates two alternative Brexit scenarios. This papers reconsiders the estimation of potential Brexit effects in a unifying framework applying a panel data estimator which exploits the general equilibrium constraints imposed by the system of multilateral resistances. The comparative static analysis accounts for full endowment general equilibrium effects and explicitly assesses uncertainty in the estimated Brexit effects for each counterfactul policy scenario using theory consistent confidence intervals. Furthermore, we apply two alternative specifications of the underlying gravity model based on different trade policy indicators, i.e., customs unions and FTAs versus RTAs. This paper utilizes a tailor-made dataset based on OECD's STAN and UNIDO's production database for 65 economies for a time period spanning the years from 1994 to 2012. As compared to the previously mentioned studies based on WIOD data, our data source accounts for a larger number of newly formed free trade agreements facilitating the identification of the potential trade effects from Brexit which, in turn, are used for the counterfactual policy scenario analysis.

The structural panel data gravity model
Following the seminal contribution of Anderson and van Wincoop (2003), in a cross-section of C countries observed over T periods bilateral trade flows are assumed to be generated as Bilateral trade flows from country i to j in period t are normalized by world expenditures, Allen et al. 2014). Time varying trade frictions are modeled as t 1−σ ijt = e z ijt α , while the country-pair fixed effect µ ij captures time invariant unobserved bilateral barriers to trade. κ it denotes the share of country i in the value of world production, while θ jt refers to the share of expenditures relative to total world income. Thus the gravity model allows for exogenously determined multilateral trade imbalances across countries. The countries' production and expenditure figures are as well assumed to be exogenously given. The disturbances are denoted by η ij , with E[η ijt |z ijt ] = 1 and can be heteroskedastic or arbitrarily correlated in the exporter-time, importer-time and country-pair dimensions, respectively (Egger and Tarlea 2015).
Multilateral trade resistances enter the model in normalized form as e β it (α,µ) = κ it Π it (α, µ) σ−1 and e γ jt (α,µ) = θ jt P jt (α, µ) σ−1 and depend on the parameter vector α referring to trade barriers, the pair specific fixed effects and on the number of countries in the sample. For i, j = 1, ..., C and period t the reparameterized system of trade resistances can be compactly written as In the absence of any trade barriers (i.e., α = 0, µ ij = 0), one may set Π it (0) = c t and P jt (0) = 1/c t , where c t is a time-specific constant so that e β it (α,µ) = c t κ it and e γ jt (α,µ) = θ jt /c t . Since the solutions of the system of trade resistances are unique up to a constant, without loss of generality, the normalized outward resistance term of country C is set to 0 for i = C. Furthermore, the country-pair fixed effects need to be normalized as well. An observational equivalent parametrization reads as The first set of T restrictions normalizes inward and outward trade resistances setting β Ct = 0. The second set of the 2C − 1 restrictions refers to pair fixed effects, from which only (C − 1) 2 are identified in the presence of country-time specific trade resistance terms. Here, µ Cj = µ jj = 0 for j = 1, ..., C. Under this parametrization it follows that β Ct = 0, µ ii = 0 and µ Cj = 0. The normalization of trade flows by Y t,W implies that there is no constant in the model and without further structural assumptions on the DGP the value of world production denoted by Y t,W remains unspecified.
In order to obtain the full endowment general equilibrium effects (Yotov et al. 2016), the system of multilateral resistances is reformulated to allow endogenous adjustments of gross production and expenditures as a response to counterfactual changes in mill prices. Specifically, in Appendix A.2 it is shown that the reparameterized system of multilateral resistances can be written as and the index 0 refers to the baseline scenario. For estimation, κ it and θ jt are observed and are taken as given. However, the solutions of counterfactual scenarios fully respect their endogenous adjustment. Allen et al. (2014) prove that under a set of low level assumptions the equilibrium exits and is unique under a proper normalization of the model.

Econometric model, data and estimation results
The specification of the structural gravity model follows Yotov (2012), Bergstrand et al. (2015) and Heid, Larch and Yotov (2015) who argue that the impact of (bilateral) trade policies are best identified in a model that includes domestic trade flows (i.e., from country i to i), comprises a border dummy (B ij ) taking the value 1 if i = j and 0 else which is interacted with a time trend (t) to allow the (international) border effects to change over time, and captures the evolution of international trade that may be different for more distant trading partners and for neighboring countries. Hence, the border-trend variable is additionally interacted with log(dist ij ) and a dummy for contiguity contig ij , respectively. The inclusion of domestic trade flows allows to identify the parameters associated with these three international trade related covariates. With regard to the counterfactual scenario analysis, this empirical approach enables us to extrapolate secular globalization trends beyond the estimation period for predicting short-and medium-run Brexit effects. Furthermore, we include a dummy, D GR , which only takes on a value of 1 for the year 2009 and is zero otherwise. This variable is interacted with the border dummy and controls for the short-run international trade reducing impact of the Great Recession.
Regional trade agreements, in general, reduce tariffs and possibly also non-tariff barriers to international trade, but by definition do not affect domestic trade. Conceptually, regional trade agreements may thus be thought of yet another determinant that reduces (international) border effects. Following this reasoning, the dummy variables indicating the presence of alternative types of international trade agreements are likewise interacted with the border dummy. Moreover and in line with Bergstrand et al. (2015, p. 313), these interaction terms additionally enter the specification with 3-year and 6-year lags, respectively, to account for phasing-in effects and sluggish adjustment of trade flows over time.
The resulting empirical specification of the gravity model identifies the change of border effects over time, but not their level, which is absorbed by the country-pair fixed effects. It thus provides a clean measurement for the impact of changing trade barriers on bilateral trade over time, since domestic trade flows serve as the base and are fully described by the fixed country-pair effects and the trade resistance terms. For estimating the Brexit induced trade effects, we apply two alternative specifications of the gravity equation. Specification (1) differentiates between the impact of customs unions (such as the EU) and FTAs, while Specification (2) subsumes CUs and FTAs in a single RTA indicator variable. Formally these two specifications read as The estimation applies the panel data CPPML estimator derived in Pfaffermayr (2017), which assumes that gross production and expenditures are given and the system of multilateral resistances holds in expectation. Furthermore, the estimation procedure eliminates country-pair fixed effects like the standard panel PPML. The estimation uses a zig-zag Gauss-Seidel algorithm, which is described in more detail in Appendix A.1. The main advantage of constrained panel data PPML is that it delivers predictions that adhere to the restrictions imposed by the system of trade resistances even in case of missing trade flow data and this estimator is unaffected by the incidental parameters problem. The estimated standard errors of the parameter estimates of the structural parameters α account for these restrictions and are derived in more details in Pfaffermayr (2017). Appendix A.3 compactly discusses the calculation of the confidence intervals for counterfactual scenario predictions. Moreover, this estimation procedure allows for three-way clustering across country-pairs, exporter-time and importer time, respectively, as suggested by Egger and Tarlea (2015). Since the multilateral resistances are functions of the estimated structural parameters, the delta method can be applied to obtain standard errors for percentage changes in trade flows and welfare based on the assumed counterfactual Brexit scenarios.
We use data on bilateral goods trade as well as compatible data on gross production, total exports and imports for total manufacturing for 65 countries. The bilateral trade flow data and the unilateral data are consistent in the sense that the total value of exports of a single country adds up to its production value and the value of all imports to its expenditures, when accounting for domestic trade flows. Thereby, domestic trade is defined as gross production minus total exports. 4 The database covers the time period from 1994 to 2012 in three-year intervals and is described in more detail the Appendix A.4. Trade flow data are taken from OECD's STAN database and Nicita and Olarreaga's (2007) database. The data on gross production, total exports and imports are collected from several sources (OECD-STAN, UNIDO, CEPII and WIOD). These figures have been carefully checked to be consistent with the trade data and it is ensured that none of them is missing. Thereby, a few data points have been interpolated. 5 A detailed description on the applied imputation procedures for bilateral trade flows, gross production and expenditures is offered in Appendix A.4. Population weighted distances and the dummy for contiguity is taken from Mayer and Zignago (2011). 6 The information on regional trade agreements stems from Mario Larch's Regional Trade Agreements Database (Egger and Larch 2008). This database provides dummy variables indicating the presence of a customs union, a free trade agreement (FTA) and a regional trade agreement (RTA). The RTA dummy covers both customs unions and FTAs and is coded as 1 if either a customs union or a FTA is in force and zero otherwise. In Specification (1) we separately estimate the bilateral trade effects of custom unions and FTAs, respectively while Specification (2) pools all trade policy agreements together and estimates average RTA effects. The second specification more closely follows the empirical Brexit literature discussed above. Specification (1) aims at identifying potentially heterogeneous trade effects stemming from trade policy measures with varying depths in their respective scope.  (1) and (2), respectively. In our data only 4% of bilateral trade flows are missing and thus CPPML and the standard PPML deliver rather similar parameter estimates. Overall, we find a pronounced downward trend in the size of trade distorting border effects as indicated by the positive border-time interaction effects. Furthermore, these estimates imply that, on average, the share of international trade in world trade expands by 3.5% (Specification 1) and 4.5% (Specification 2) per year. 7 Yet, these are the estimated direct border effects which neglect the associated changes in multilateral resistances. This finding, however, is also well in line with the observed pattern in the data. Table A1 in Appendix A.5 shows that the shares of domestic trade flows in the UK, the EU and the rest of the world (ROW) (substantially) declined from 1994 to 2012. Accordingly, domestic trade has been increasingly substituted by international imports and exports. The interaction of the border dummy with log distance indicates that the identified global trend of falling international trade barriers is weaker for more distant trading partners. For neighboring countries this trend is reinforced but not significantly so as can be inferred from the parameter estimates associated with the contiguity-time interaction term. Further, the estimates suggest that customs unions substantially promote international trade. Their impact on bilateral goods trade accumulates to an increase of 64.2% after 6 years as indicated by the total trade effect parameter which amounts to 0.5 and is reported in the lower part of Table 2. 8 Interestingly the formation of a FTA initially induces an insignificant negative impact and its total accumulated bilateral trade effect effects and that the positive parameter estimates indicate the "lessening' of border effects over time. 8 We use the approach of van Gardaren and Sha (2002) who suggest to estimate percentage changes based on a parameter associated with a dummy variable in a semi log-specification, say c, by p c = 100(e c−0.5 * σc − 1). after six years amounts to only 33.3%. The findings from Specification (1) thus point to the relevance of distinguishing between customs unions and FTAs for trade policy analysis (Baier, Bergstrand and Feng 2014). Specification (2) finds that RTAs exhibit an accumulated trade enhancing effect of 38.7%. Given that FTAs are a more common trade policy tool as compared to the establishment of customs unions, the estimate stemming from the RTA indicator unsurprisingly is closer to the one from FTAs. All these estimation results only refer to the measured direct effects of international trade agreements and do not yet take general equilibrium effects into account. Overall, the estimated direct effects are well in line with those in the literature and point to pronounced phasing-in effects of trade agreements (see, e.g., Baier, et al. 2014;Bergstrand et al. 2015).
In Table A2 in Appendix A.5 we provide a detailed robustness analysis for the bilateral trade effects stemming from trade policies. Accordingly, we re-estimate Specifications (1) and (2) for modified and alternative data sources and apply some alternative specifications. First we exclude all imputed trade flows and obtain very similar estimation results. Second, we alternatively use 3 year averages from the WIOD data spanning the years 2000 to 2012 and estimate gravity models for 42 mainly developed economies. This allows to compare our findings more directly with the available literature as most other Brexit studies rely on trade data based on input-output tables collected in the WIOD project (see Table 1). Specification (1) yields a very similar estimate for the long-run impact of customs unions, while the cumulative direct effect of FTAs and RTAs turns substantially lower (0.12 and 0.13, respectively). Furthermore, the cumulative impact of FTAs is insignificant in the WIOD sample. This finding indicates that WIOD data might not be most useful for identifying accurate trade policy effects. Prior to the year 2000, the 42 included countries have already been very active in implementing free-trade policies which result in small time-variation exploitable for estimation purposes. Table A3 in Appendix A.5 documents this phenomena descriptively. The overall share of any free trade agreement as captured by the RTA indicator shows substantially more time-variation in our data as compared to the WIOD database. In 1994 only 18% of all bilateral trade relationships profited from favorable market excess. Until 2012 this share increased to 38% in our dataset. The share of RTA-affected trade relationships in the WIOD amounted to 44% in 2000 and increased to 57% in 2012. For the UK as an historically free-trade policy active country, the share of RTAs is larger and especially in the WIOD database only increases by 5 percentage points from 2000 until 2012.
The last two robustness checks modify the empirical specification with regard to the time-trend assumed for the changing nature of border effects. The third set of columns reported in Table A2 additionally includes an interaction term of the border dummy variable with squared time. This allows the border effects to change non-linearly over time. As indicated by the parameter estimates, this effect is zero which allows us to rule out misspecification in the border-time effects. The last set of results corresponds to a specification close to the one applied by Bergstrand et al. (2015). Accordingly, the border dummy is not interacted with time assuming a time-constant trade distorting effect for international versus domestic trade. The parameter estimate associated with the common border dummy is positive capturing the average increase in international versus domestic trade. The total effects steeming from trade policies are, however, only marginally affected. The customs union effect increase from 0.5 (Table 2) to 0.54 while the FTA and RTA effects are reduced by 0.01, respectively.
In general, the results provided in Table A2 point to the robustness of our baseline estimates and further sheds some light on potential identification issues when relying on the WIOD for evaluating the impact of trade policies on bilateral trade. In our case, the trade enhancing effects of FTAs and more generally RTAs are substantially lower when applying WIOD data. As a consequence, any counterfactual scenario which relies on these parameters would identify smaller trade and welfare effects as compared to data provided in OECD's STAN database.

The trade and welfare effects of Brexit
The two alternative empirical specifications of the gravity model allow us to define four counterfactual Brexit scenarios, two of which we classify as soft Brexit and two refer to a hard Brexit. With the data at hand, we proceed as if Brexit materialized in 2012 (last year of available observations) for identifying the short-run effects of the Brexit and calculate out-of-sample predictions for t + 3 and t + 6 for obtaining medium-run effects.
The first scenario refers to the determination of UK's membership in the customs union formed be the EU countries. For the soft Brexit it is assumed that a free trade area with the remaining EU member countries is established instead, while all trade agreements of UK with non-EU countries remain unaffected by Brexit. The hard Brexit scenario based on Specification (1) also abandons the membership of UK in the existing customs union established by the EU. However, it is further assumed that a new arrangement of UK with the EU countries cannot be established. In addition, this scenario also abolishes all existing trade agreements of UK with third countries. As a consequence, in this scenario the UK would not take part in any trade agreements and would trade under WTO rules. Specification (2) subsumes all existing trade agreements into the single RTA indicator. For the soft Brexit scenario this dummy variable is set to zero for the bilateral UK-EU trade relationships, while the trade policy relationships of UK with all non-EU member states would remain unaffected. As in Specification (1), the hard Brexit version of this scenario additionally switches off all RTAs that the EU has established with third countries. In all experiments we change the respective current and lagged dummies for the trade agreements so that the trade impact of Brexit is immediately realized and the alternative counterfactual scenarios account for phasing in effects in case UK would be able to negotiate a new FTA with the EU. This implies that the immediate effect of a new FTA is zero and only after three years a significant trade enhancing effect could be materialized (see Specification 1 in Table 2).
Tables 3 to 5 report the full endowment general equilibrium effects of Brexit that account for changes in multilateral trade resistances, in gross production and incomes, respectively. Besides the estimated general equilibrium effects the tables also report 95-confidence intervals (in square brackets) that are based on the delta method and the panel data CPPML as discussed in Pfaffermayr (2017). The tables document unweighted averages for groups of bilateral trade combinations. In Table 3, the rows depict the Brexit induced changes in bilateral exports from the first to the second economic region mentioned. The estimation results corresponding to the rows denoted by UK-EU, for example, indicate the changes in UK's exports to the EU. Overall, we observe moderate changes in the Brexit effects over time due to the secular trends in globalization. Thus, in our discussion we focus on the estimated consequences of Brexit for the t + 6 out of sample predictions.

The soft Brexit scenario
As shown above, the estimated long-run impact of customs unions on bilateral trade is much higher than that of FTAs. Even if UK would be able to successfully negotiate a new FTA with the EU member states a significant reduction in bilateral trade has to be expected. Table 3 reports that under the soft Brexit scenario and Specification (1) the structural gravity model predicts a reduction in UK-EU trade by -16.8% [-26.4%, -7.2%] six years after the Brexit will take place and one of -13.8% [-21.7%, -5.9%] for the corresponding flows from the EU to UK. 9 The negative bilateral trade effects stemming from the soft Brexit scenario are the largest in the year the Brexit will take place (most likely in 2019) and the phasing-in effects of a potential EU-UK FTA will reduce the negative trade effects by about 1.2 percentage points over six years. To a small extent, the UK will be able to compensate this decline by an increase in trade with third countries (UK-ROW 3.0% [1.0%, 5.1%] and ROW-UK 6.0% [2,0%, 10.0%], respectively). The latter effects indicate a positive trade diversion effect implied by UK's withdrawal from the single market. Imports from the ROW will become relatively cheaper (due to an increase in trade costs for EU exports to the UK) and thus the ROW will gain from a Brexit via a 6% (average) increase in its exports. In the long-run this might also have implications for UKs trade balance with the ROW as exports from UK to the ROW are only increasing by about 3%. Trade flows within the EU and also that of EU member states with the ROW can be expected to be hardly affected by Brexit. Six years after the Brexit, the full endowment general equilibrium model suggests an increase of within-EU27 bilateral trade flows of about 0.4% which, however, is statistically not different from zero as indicated by the lower bound of the confidence interval which takes on a value of -0.1%. Exports from the EU to the ROW are estimated to increase by 0.7% under the soft Brexit scenario when applying the direct trade effects stemming from Specification (1). This effect is  statistically significantly different from zero. The some holds true for the negative but very small EU import effect from the ROW which, on average, amounts to -0.08%.
As hoped for by Brexit supporters in the UK, the soft Brexit scenario of Specification (1) fosters domestic trade by 9.3% [2.8%, 15.3%] six years after the Brexit as indicated in Table 4. Again, the immediate effect is very large and the adjustment over time is relatively small. Furthermore, the reported confidence intervals document substantial uncertainty in the domestic trade effect. The true effect most likely lies somewhere between 2.8% and 15.3% where actual realizations close to one or the other boundary of the interval would provide very different implications for the UK economy. This domestic trade effect is again driven by relative increases in costs for goods provided from the EU. The increase in relative costs induces a substitution of imports from the EU by relatively expensive but domestically produced goods.
In line with standard trade theory such a substitution will induce a welfare loss as consumers are faced with higher (average) prices after the Brexit has taken place. We calculate the welfare effects of Brexit by applying the approach suggested by Costinot and Rodríguez-Clare (2014). The results are reported in Table 5. Accordingly, when applying the soft Brexit scenario to Specification (1) the welfare effects from UK's leaving of the EU are most likely in the range of -1.5% [-2.6%, -0.3%]. For this calculation we assume an elasticity of substitution of 6.98, the preferred estimate reported by Bergstrand, Egger and Larch (2013, Table 1). The results suggest that under a soft Brexit scenario, in which the UK would be able to negotiate a post-Brexit FTA with the EU, the welfare losses from leaving the single market might not be too severe. Accordingly, UKs GDP would be about 1.5% lower six years after the Brexit as it would be in the hypothetical scenario in which the UK would have voted to remain within the EU. Table A4 in Appendix A.5 provides a robustness analysis for the calculated welfare losses. In particular, we are varying the elasticity of substitution such that it can take on the 1% critical values from the confidence interval reported in Bergstrand et al. (2013). Table A4 documents that the obtained welfare effects are not very sensitive to changes in the elasticity of substitution. 19

The hard Brexit scenario
When focusing on the hard Brexit scenario, the Brexit induced consequences for bilateral goods trade and welfare are much more pronounced for the UK. Specification (1) predicts a decrease in UK exports to the EU by -35.5% [-45.7%, -25.3%]. Imports from the EU are expected to decline by -29.4% [-38.2%, -20.6%]. In other words, in the worst case UKs exports to the EU could drop by almost one half while the EU might also export about 40% less manufacturing goods to the UK. In this scenario, UK will also not be able to maintain its trade preferences with all non-EU countries and thus it would be substantially harmed by trading under WTO rules only. The counterfactual scenario results thus further suggest a reduction of UK-ROW trade by -2.9% [-5.6%, -0.04%] but the UK imports from the ROW would increase by 4.9% [1.1%, 8.6%]. The hard Brexit scenario thus would imply a substantial worsening in UKs trade balance with all other countries around the world including the remaining EU member states and would definitely make the UK a much more closed economy as it is today.
This fact is underlined by the tremendous increase in domestic trade induced by a hard Brexit which is reported in Table 4. Accordingly, six years after the Brexit has taken place domestic trade would be increased by 23.2% [12.9%, 33.4%], which is more than twice the number estimated for the soft Brexit scenario using the same empirical specification. Similar to the soft Brexit scenario, the EU27 economies are in total only marginally affected in terms of domestic trade and welfare effects although the trade conditions would be significantly worsened. The large increase in domestic trade of relatively expensive goods in the UK also translates into larger welfare losses to be expected. Six years after the Brexit has taken place UKs GDP is thus estimated to be about -3.5% [-5.7%, -1.4%] lower under the hard Brexit scenario. Based on our estimates, a hard Brexit would more than double the economic costs stemming from Brexit via trade in manufacturing goods only.

The regional trade agreements specification
As compared to the results obtained from Specification (1), the differences in the effects between hard and soft Brexit are smaller when applying Specification (2), which estimates a significant direct long run RTA effect of 38.7% (see discussion above The estimated impact of Brexit on trade and welfare compares well to the findings available from the literature which are reported in Table 1. The results support the need for the UK to establish trade agreements with non-EU economies in order to at least partially compensate for the reduction in trade with single market member states. Given the geographic location of UK and the still prevalent burden of large distances for international trade, trade agreements with non-EU countries will most probably become not as economically successful as UKs integration into the European single market. Against this backdrop, Brexit will most likely come with some economic costs stemming from a (substantial) decline in trade with the remaining EU27 economies.
However another important aspect to note is that we observe considerably large confidence intervals of the estimated full endowment general equilibrium effects despite the fact that most of the parameters are estimated with high precision as indicated by the large tvalues (in absolute numbers) attached to most of them. This implies that the uncertainty induced by the estimation of the structural gravity model is substantial and documents the need to apply a theory-driven approach for estimating and predicting the trade and welfare effects of trade policy measures. It also reveals that the provision of some average effects based solely on the parameter estimates might not be very informative for policy makers, as the broad bandwidth of possible effects provides important additional information on the likely impacts stemming from alternative post-Brexit scenarios.

Conclusions
This paper studies the Brexit induced welfare effects stemming from trade in manufacturing goods by applying an estimation approach which allows to estimate counterfactual scenario outcomes consistent with structural trade theory and to exploit the system of multilateral resistances for calculating confidence intervals. In this regard, the suggested approach naturally takes the uncertainty surrounding the Brexit negotiations explicitly into account and allows to present a meaningful bandwidth for the possible general equilibrium trade effects for the UK, the EU and the ROW, respectively. Furthermore, this approach enables us to estimate both immediate and medium-run trade effects stemming from Brexit by exploiting the panel structure in the data which allows to model phase-in effects in the counterfactual trade policy scenarios. Furthermore, by combining the proposed panel data structural gravity estimator with the full endowment general equilibrium model suggested by Yotov et al. (2016) we are able to assess the manufacturing trade induced welfare effects from Brexit.
The estimation results suggest that the largest adverse trade and welfare effects are to be expected in case of a hard Brexit in which UK would only trade under WTO rules. The formation of free trade agreements with other countries as suggested in the Global Britain strategy would most likely be able to dampen these negative effects but would not fully compensate for the withdrawal from the European single market. Across all different scenarios, the negative trade effects of Brexit are accompanied by a substantial increase in domestic trade within UK and with some minor increase in trade with third countries. Thereby, the the imports from the ROW will increase by more as the exports from UK to ROW. In the long-run this can also have important implications for UKs trade balance with all non-EU member states. In contrast, intra-EU trade is estimated to only marginally increase after UKs leaving of the EU.
The estimated (positive and mainly domestic) trade diversion effects are not sufficient to fully compensate for the losses stemming from reduced trade with the EU. Our calculations for the welfare effects suggest a Brexit induced decrease in UKs real income (real GDP) in a range between 0.3% and 5.7%. This effect is driven by a substitution of relatively cheap imports of manufacturing goods from the EU27 by relatively expansive domestic production. EU27s welfare, by contrast, is not statistically significantly affected by UKs withdrawal from the EU. For the whole EU the trade relationships with the UK are not as important as these economic ties are for the UK. As a consequence, our estimates suggest substantial costs likely to be triggered by Brexit which have to be borne by both economic areas. However, the expected decline in bilateral trade flows of manufacturing goods will be much more damaging for the UK.
Furthermore, our findings should be considered as a lower bound estimates of the potential overall economic costs involved in the Brexit. In this paper we are not considering other channels for bilateral economic relationships such as migration, trade in services and FDI. Similar to the trade effects, it is very likely that bilateral FDI flows between both economic areas are also declining with potential adverse effects on UK's productivity (Dhingra et al. 2016). Furthermore, due to data limitations we are only able to investigate the Brexit effects for manufacturing goods trade. According to Felbermayr et al. (2017), the trade distorting effects of Brexit might be even more pronounced for the services sectors. Thus, the negative welfare effects stemming from reduced bilateral trade of services might be larger as the ones identified from manufacturing goods. This in turn would increase the overall welfare losses associated with UK's withdrawal from the EU.

A.1 Constrained Panel PPML estimation
For estimation purposes, the structural gravity model can be reformulated in an abbreviated notation with additive disturbances , γ C (α, µ)] and the tilde notation for restricted parameters is skipped.
Constrained Panel PPML uses nested iterations in a partial Gauss-Seidel algorithm (Guimarares and Portugal 2010;Smyth 1996) that avoids the inversion of large matrices if the countrypair dummies are included. In each iteration step r the iterative estimation procedure calculates the following vectors and matrices: m ijt,φ,r = e z ijt αr+β it ( αr, µr)+γ jt ( αr, µr) m ijt,r = m ijt,φ,r e µ ij,r where G r is assumed to be non-singular. D µ denotes the dummy design matrix for the country-pair effects, while D φ comprises the dummies for the multilateral resistance terms. V is a diagonal matrix with ones for observed trade flows and zero for missing ones.
Step 2 of the procedure shows that the country-pair fixed effects (µ ij ) are fully determined by the country-pair means of the bilateral trade flows θ µ and the other structural parameters and do not need to be estimated explicitly (see Wooldridge 1999). Hence, the inference is conditional on θ µ .
A.2 Full endowment general equilibrium Following Yotov et al. (2016), we write demand as where b it is a preference parameter or may be determined by another isomorphic model.

Market clearing implies
To obtain the full endowment general equilibrium effects of counterfactual changes in trade barriers, the impact on factory gate prices and thus on the value of production has to be considered in addition to the impact on nominal trade flows. Production may be written as p it,0 . The index 0 refers to the initially observed values in the baseline situation. 10 Using the parametrization in the text

A.4 Data base
The empirical analysis focuses on trade of manufacturing goods observed over periods of 3 years during 1994-2012. The panel is based on several data sources. The primary data source is OECD's-STAN data base that reports consistent figures for bilateral trade flows, total exports, total imports and gross production, however the latter three figures only for OECD economies. Trade flows are measured in nominal cif-values as reported by the importing country. To obtain a larger group of countries and more observations on trade flows, the trade data had been augmented by Nicita and Olarreaga's (2007) Trade, Production and Protection database. This database comprises consistent data on bilateral trade flows including mirrored ones for a large set of countries. Missing bilateral trade flows from the STAN database have been imputed from this database using bilateral STAN trade flows as the dependent variable in a PPML framework. Explanatory variables are the log trade flows of Nicita and Olarreaga (2007), the log of mirrored values interacted with a missing dummy for World Bank data as well as exporter, importer and time effects. This procedures allows to impute 43,531 annual missing trade flows. However, not all observations on trade flows can be used due to missing data on gross production. The robustness section thus re-estimates the structural gravity model considering all imputed trade flows as missing (see Table A2 in Appendix A.5).
STAN'S data on gross production have been augmented by UNIDO's and CEPII's data bases (De Sousa, Mayer and Zignago 2012), respectively, again using PPML to regress gross production on the log of its counterparts in UNIDO and CEPII along with interactions of log production with country and year dummies as well as country and year dummies themselves. Overall 277 observation on gross production have been imputed from CEPII and the 279 from UNIDO. In a few cases (CYP, BEL, EST, NLD, IRL, LUX, LTU, SVK, SVN) these production data turned inconsistent with trade flow data and information from WIOD has been used instead. In this way the set of countries with consistent trade and production data could be expanded to 65. The same imputation procedure has been applied for total exports and imports. Here additional data sources are aggregates from the Nicita and Olarreaga (2007) database and 478 values for total exports and 556 for total imports had been imputed. Finally, a in a few cases data have been interpolated.
The data on trade flows, x ijt , production, Y it , and expenditures, E it , are corrected for trade with the rest of the world as well as for trade imbalances which have been taken as given.
The total production value of country i at time t is given as x i.t = C j=1 x ijt + x i,ROW,t , while total expenditures can be derived as x .it = C j=1 x jit + x ROW,i,t . This implies the trade balance of a country i are defined as d it = x i.t − x .it . Since data are available for 65 countries, exports to the rest of the world (ROW) and imports from ROW of country i at time t have been aggregated in x i,ROW,t and x ROW,i,t . Domestic shipments are implicitly defined as while expenditures net of imports to ROW are given as.
Thereby, Y t,W denotes overall (world) production or expenditures for the 65 countries. Note that C i=1 d it = 0 holds per definition and that C i=1 κ it = C j=1 θ jt = 1.     Bergstrand et al. (2013). Confidence intervals are calculated by the delta method (see Appendix A.2). CI lower and CI upper denote the estimates for the two-sided 95% confidence interval.