Transfers in the gravity equation

. This study integrates development aid into a theoretically founded structural gravity model that considers primary and secondary eﬀects of aid as an income transfer and as a bilateral trade cost determinant. We identify the parameters of our model using a two-stage approach that includes a state-of-the-art Poisson pseudo-maximum likelihood gravity estimation for a sample of 132 countries over the period 1995 to 2012. The main ﬁndings indicate that bilateral aid only increases bilateral trade for countries that do not have a common language, a past colonial relationship or an RTA. On average, 1 USD of additional foreign aid from all donors increases recipients’ net imports by around 0.36 USD. Our comparative statics indicate that donors experience a reduction in real consumption due to aid and recipients an increase. We also analyze the eﬀect on third countries. The modelling framework also applies to the study of other transfers such as remittances. Résumé.


Transfers in the gravity equation
Hendrik W. Kruse University of Göttingen;Université d'Orléans;CNRS;LEO and Labex VOLTAIRE;FRE 2014 Inmaculada Martínez-Zarzoso University of Göttingen and University Jaume I Abstract. This study integrates development aid into a theoretically founded structural gravity model that considers primary and secondary effects of aid as an income transfer and as a bilateral trade cost determinant. We identify the parameters of our model using a two-stage approach that includes a state-of-the-art Poisson pseudo-maximum likelihood gravity estimation for a sample of 132 countries over the period 1995 to 2012. The main findings indicate that bilateral aid only increases bilateral trade for countries that do not have a common language, a past colonial relationship or an RTA. On average, 1 USD of additional foreign aid from all donors increases recipients' net imports by around 0.36 USD. Our comparative statics indicate that donors experience a reduction in real consumption due to aid and recipients an increase. We also analyze the effect on third countries. The modelling framework also applies to the study of other transfers such as remittances.

Introduction
F F oreign development aid provides important monetary resources for many low-income countries. On average, low-and lower-middle income countries receive aid worth around 3% of their respective GDP. In some extreme cases (such as Tuvalu after 2008 or Guinea-Bissau in 1996) aid is around 50% of GDP. Palau even received aid worth more than twice its GDP in 1994, the year of its independence.
In order to understand the effect that development aid and other international transfers can have on macroeconomic performance, it is important to study their effect on recipients' trade flows. First, for any nominal transfer to have a real effect, it would have to increase net imports relative to domestic production, given that, for aid to be absorbed, either the consumption of goods or services, investment or government expenditure has to increase (Temple and Van de Sijpe 2017). Second, it is well documented (Trionfetti 2018) that, in the presence of trade costs, any transfer can have secondary terms of trade effects beyond primary income effects. Third, numerous studies show that development aid specifically is often not impartial but linked to higher bilateral trade between recipient and donor (Wagner 2003, Silva and Nelson 2012, Pettersson and Johansson 2013, Martínez-Zarzoso 2015. This, in turn, can counteract the secondary effects stemming from aid. Finally, aid may benefit (or harm) third countries. For instance, countries that trade intensively with recipients may benefit from additional demand due to aid.
Our study integrates development aid into a structural gravity model and incorporates all four of the aforementioned aspects. In doing so, it presents a more complete analysis of the beneficiaries of aid transfers-recipients, donors or third countries-and the extent to which they profit.
We contribute to the literature in three ways. First, we develop an extension of the theoretical gravity model à la Anderson and van Wincoop (2003) that considers aid as a transfer and distinguishes between aggregate and bilateral effects of aid. As such, we perform a two-stage analysis, where aid first increases aggregate demand and hence net imports and, in a second stage, aid may additionally affect bilateral imports by changing bilateral trade costs. Second, to the best of our knowledge, we are the first to study the effect of aid on bilateral trade using a state-of-the-art Poisson pseudo-maximum likelihood estimator with the full set of fixed effects demanded by theory. Finally, the use of the structural gravity model allows us to calculate comparative statics and to gauge the export and real consumption effects of aid on recipients, donors and third countries, including the primary and secondary effects of a transfer in a similar way to Dekle et al. (2007).
In our empirical analysis, we find a robust effect of aggregate development aid on aggregate net imports of goods of around 0.36 USD per 1 USD of development aid. We find positive and significant effects of bilateral aid on bilateral imports only in the absence of other historical, cultural or political ties (measured by past colonial relationship, common language and RTA participation) after controlling for aggregate and general equilibrium effects. Our general equilibrium analysis suggests that on average recipients benefit from the trade effects of aid. Although the burden for donors is reduced by the positive bilateral effects of aid on donors' exports, the total income and terms of trade effects are negative and in net terms donors give more than they receive, which is in accordance with the main goal of development aid. Some third countries gain from demand effects, mostly if they are net exporters to aid recipients and net importers from donors.
The remainder of this paper is structured as follows. Section 2 provides an overview of the existing literature. In section 3, we present the augmented gravity model and derive the partial and general equilibrium effects of aid. Bilateral effects are added in section 3.2. Section 4 discusses the empirical implementation of the two-stage model, and section 4.1 describes the method used to calculate comparative statics. In section 5, we describe the data sources used for our estimation (5.1), present the main empirical results (5.2), carry out some robustness checks (5.3) and report the estimates for the general equilibrium effects (5.4). Finally, we conclude in section 6.

Literature review
Our paper is related to three broad strands of the literature concerning development aid or, more generally, transfers and their effect on trade.
First, our paper feeds into the literature on the transfer problem. As in much of this literature, the mechanism at play in our model comprises income and terms of trade effects. According to many studies, terms of trade effects arise due to differences in expenditure shares between the donor and the recipient of a transfer. For instance, Dixit (1983) provides a framework for studying the effects of transfers in a model with third countries, homogeneous goods and frictionless trade. He deems transfer paradoxes-where donors gain due to the secondary effects-mere theoretical possibilities. Brakman and van Marrewijk (1995) study tied and untied aid in a two-country world with monopolistic competition in the manufactured goods sector. They show theoretically that tying aid can reduce the loss for the donor and the benefit for the recipient. Finally, in Trionfetti (2018)-as in this study-terms of trade effects arise due to trade costs. Trionfetti (2018) studies the effect of transfers in the context of monopolistic competition, trade frictions and heterogeneous firms. He demonstrates that welfare effects beyond the income and terms of trade effects may occur.
The second strand of literature empirically studies the extent to which aid increases expenditure and leads to higher domestic absorption and net imports. For instance, applying a dynamic generalized methods of moments model, Aiyar and Ruthbah (2008) find that in the short run 30% of aid is absorbed, while the figure increases to 83% in the long run. Using a vector autoregression model, Hansen and Headey (2010) find absorption ratios close to 40% for small developing countries. Werker et al. (2009) use an instrumental variable approach based on windfall gains from the oil crises. They find that receiving aid leads to a significant increase in imports and has no effect on exports for Muslim-majority countries. Werker et al. (2009) report similar findings for a larger set of countries using a common correlated effects model with instrumental variables. Moreover, they show that most of the increase in absorption translates into higher levels of consumption. Berg et al. (2015), in a theoretical contribution, study the role of independent central banks and exchange rate regimes in aid absorption.
Third, there are numerous studies investigating the extent to which aid helps promote the donor's exports to the recipient. One channel discussed above can be tied aid (Brakman and van Marrewijk 1995), which helps reduce the donor's costs. Djajic et al. (2004) go beyond that and argue that, due to habit formation, giving aid could serve the commercial interests of the donor in future periods. The empirical studies that focus on bilateral effects suggest that aid leads recipient countries to source more imports from donor countries and, hence, increases donors' exports. Djajic et al. (2004) was the first author to estimate a gravity model of trade augmented with foreign aid for European Union donors. He finds a positive and significant bilateral effect of development aid. Wagner (2003) extends the approach to evaluate aid given by OECD countries. Adding bilateral fixed effects to control for unobserved trade costs, he finds a smaller effect than Nilsson (1997), but it remains positive and significant. Martínez-Zarzoso et al. (2009) estimate the effect of German aid on German exports using a dynamic OLS framework to account for endogeneity. Like the previous studies, they obtain positive and statistically significant results. Martínez-Zarzoso et al. (2016) study the effect of German aid on German sectoral exports and find the highest effect for machinery, electrical equipment and transport equipment.
These studies employing the gravity equation treat bilateral development aid as a trade cost determinant. Anderson and van Wincoop (2003) show that the gravity equation provides biased estimates for trade cost determinants if multilateral resistance to trade is not controlled for. Silva and Nelson (2012) address this issue by using a log-linear approximation of these multilateral resistance terms (MRT) proposed by Baier and Bergstrand (2009). They too find positive and significant results. Martínez-Zarzoso et al. (2014) include multilateral and third-country aid, and use bilateral, country and year fixed effects to account for unobserved trade cost determinants and multilateral resistance terms. They use a sample of DAC donors and find heterogeneous effects of bilateral aid on donor exports. They find that positive effects are more prevalent in the group of donors with a higher share of tied aid. Also, they find no evidence of adverse effects on third countries' exports except for EU donors.
The problem of zero bilateral aid flows is another key issue in this literature. Most studies use a log-linearized gravity model with the log of aid on the right-hand side. This implies that observations with zero aid will be dropped. One remedy is to add a small amount to all aid flows. Wagner (2003) argues against this practice because it is not well defined what constitutes a small amount. Instead, he includes a zero-aid dummy. Hansen and Rand (2014) provide another solution similar to the expansion factor that our model below yields. In a robustness check they argue that if aid affects exports through the income channel, the appropriate variable is ln 1 + Aid GDP , which avoids the zero-aid problem. They study the effect of Danish aid on Danish exports. Their findings suggest that the effect of aid on exports is on average lower when using this approach and that it varies less across recipient countries. The effect is still positive and significant. Martínez-Zarzoso et al. (2017) obtain similar results for the Dutch case.
None of the papers listed, however, provide a theoretical framework that integrates aid as a transfer in a structural gravity model; nor do any of those papers take into account the positive demand effect of aid going to neighbouring countries. We provide such a framework and allow for income and terms of trade effects, as discussed in the literature on the transfer problem, as well as trade cost effects of aid. In section 3.1, we show that as an income transfer aid has general equilibrium repercussions that are different from pure trade cost determinants. As a consequence, the welfare implications will differ from those reported in standard applications. We model trade cost effects stemming from bilateral aid projects. As a result, our empirical model unifies the approach of Temple and Van de Sijpe (2017) and Hansen and Rand (2014) and allows for a more detailed and theory-consistent welfare analysis.

Aggregate effects
We use a modified version of the Anderson and van Wincoop (2003) model to study the effects of transfers on bilateral trade. The same logic extends to the larger class of models described by Arkolakis et al. (2012). First, we briefly review the standard gravity model of trade. In a second step, we study the role that transfers play within that framework.
We assume there are N countries each producing one unique product under monopolistic competition. As in Yotov et al. (2016), we take the quantity of production Q it as given. Then, each country i's production value at time t is given by y it = p it Q it , where y it = GDP it and p it is the producer price-or factory gate price-that countries receive when selling their product. Moreover, let E it denote country i's total expenditure. At this stage, we make no assumption as to its relation to y it . This expenditure is allocated towards goods from different countries of origin according to a CES utility function with homothetic preferences: where c ijt is the consumption of country i's good in country j. 1 β i > 0 is a distributional parameter. σ is the elasticity of substitution. The representative consumer maximizes equation (1) subject to the budget constraint E jt = i p ijt c ijt . p ijt is the price of the good exported from country i to country j. Assuming iceberg trade costs, this reduces to p ijt = p it τ ijt , where τ ijt > 1 are trade costs. We denote by x ijt ≡ p ijt c ijt the amount that the consumer in country j spends on the product from country i; that is, the value of bilateral trade. Under these circumstances, the optimal value of bilateral trade is given by where P jt ≡ i β i p it τ ijt 1−σ 1 1−σ is the theoretical price index. Finally, market income of country i, y it , is obtained by selling the domestic product at home and abroad; that is, it equals the sum of all bilateral exports and internal trade. The market clearing condition ensures that market income equals the value of production (GDP) y it = j x ijt . After making this final assumption, we arrive at the standard structural gravity system of equations (Yotov et al. 2016): where y wt ≡ i y it denotes world GDP. Π it is the outward multilateral resistance term and measures overall trade costs that the exporters face. It is derived from the market-clearing condition and inversely related to factory gate prices p it . Real consumption, which is equivalent to utility under CES preferences, is given by E jt /P jt . In the traditional Anderson and van Wincoop (2003) model, the representative consumer spends all their disposable income, which is derived from market income; that is, E it = y D it = y it , where y D it denotes disposable income. This assumption implies that trade is balanced. More recent applications of the gravity model deviate from that assumption and introduce an exogenous additive (Dekle et al. 2007) or multiplicative (Yotov et al. 2016) term to allow for unbalanced trade.
Within this framework, now suppose there are bilateral transfers at time t. We denote the bilateral transfers from country i to j by tf ijt . If tf ijt > 0 country j is a net recipient of the transfer. If tf ijt < 0 country j is a net donor to country i. In turn, tf ijt = −tf jit . Each country receives or gives transfers to multiple countries. Let T F jt = i tf ijt be net total aid inflows of country j. First, we assume that the transfers are neutral with respect to trade costs; that is, ∂τ ijt /∂tf ijt = 0. Then, T F jt is the amount by which disposable income y D jt differs from market income y jt (GDP). Disposable income is lower than market income if the country is a net donor (T F jt < 0) and higher if the country is a net recipient. In order to account for the fact that not every dollar of aid will actually reach the recipient country, let γ denote the share of aid reaching the recipient. 2 In practical terms, γ can be interpreted as the reduced form effect of aid on net imports, encompassing indirect effects of aid on net imports channelled through all the other items of the balance of payments. Total expenditure is thus E jt = y D jt = y jt + γT F jt . The immediate effect of the transfer is that trade is no longer balanced. In fact, we can write net imports as This equation captures the primary or income effect of the transfer, but the structural gravity model also allows for secondary terms of trade effects on disposable income and real consumption. According to equation (4), even a neutral transfer affects bilateral trade beyond a proportional increase. The transfer affects the market clearing condition of all countries and hence Π it . Since internal trade costs are by assumption lower than all international trade costs, Π it will rise for the donor. This implies that its factory gate prices determined by equation (6) have to decline for markets to clear. As a consequence, market income is reduced according to equation (7) and exports increase according to equation (3). The higher the trade costs between the donor and its specific recipients, the stronger this adverse terms of trade effect becomes. The opposite is true for recipient countries, where imports increase. Consequently, the transfer of real consumption exceeds the transfer of nominal income. Additionally, third countries will be affected by the transfer, since it implies a reduction of aggregate demand in one country and an increase in another. Third countries that face relatively low trade costs vis-à-vis recipient countries will be able to increase their factory gate prices, whereas those third countries with relatively low trade costs vis-à-vis the donor country will have to reduce their prices.

Bilateral effects
In most cases, development aid is neither unconditional nor impartial and may have a greater effect on trade flows between a given donor and a given recipient than on a recipient country's imports from third countries. For donors, such a bilateral effect would help reduce the secondary burden of the transfer and lessen the reduction in the terms of trade (Brakman and van Marrewijk 1995). We focus here on direct and immediate effects of aid and abstract from longterm effects. First, aid may be explicitly tied (Martínez-Zarzoso et al. 2014) in the sense that it has to be spent on products from the donor country. Second, irrespective of the specific form aid takes, it will involve some cooperation and communication between donor and recipient, which in turn may have spillover effects on the cost of other types of cooperation, for instance, trade.
We focus here on the role that aid projects implemented by the donor may play in bilateral imports. If an agency in the donor country is responsible for the spending of project funds, domestic suppliers in the donor country may have an advantage. The proximity to the donor agency reduces organizational and search costs. Hence, it allows them to supply goods used for aid projects at lower trade costs than if the decision was made autonomously by the recipient. 3 Suppose a fraction α ij of bilateral aid is project aid. Then the budget of an aid project from j in i is The project finances additional trade flows into j and can be spent on goods from different countries. The difference between trade flows financed by project aid and those financed by the recipient's disposable income lies in the trade costs. We assume that the project organized by country i in country j faces trade costs τ Å ijt < τ ijt for trade flows between donor and recipient and τ ijt for imports from any other country. We also assume that there is only one project per donor.
Thus, we can write country j's imports from any country i as the sum of imports financed by the recipient's disposable income on the one hand, and on the other hand, those financed by project funds from any country.
where P i jt denotes the price index applicable to the project organized by country i in country j. k is any country including i and j. The remaining variables are the same as in subsection 3.1. y jt + γT F jt − k α kj tf Å kjt is the disposable income the recipient country can freely spend. This does not include transfers that are linked to aid projects. This budget is spent subject to trade costs τ ijt . In the second line of equation (10), we add imports financed through aid projects.The first term within the curly brackets captures the demand effect due to other countries' projects in j on imports from i. The relevant trade costs here are the same as for the hosting country j, τ ijt . The second term within the curly brackets captures demand due to country i's project in country j, where the relevant trade costs are denoted by τ Å ijt . Next, we introduce the simplifying assumption that the price index is not notably affected by the trade costs that are preferential towards the respective donor; that is, P i jt = P jt ∀i. Then, we can rewrite equation (10) as where The primary effect of aid is the same as in subsection 3.1. Aggregate net imports increase by γ with every dollar of aid, irrespective of α ij . 4 Nonetheless, project aid affects the allocation of the spending financed by aid. We therefore refer to the bilateral effect as an allocation effect.
Note that δ ijt depends negatively on τ Å ijt /τ ijt . In the extreme case of τ Å ijt = τ ijt -that is, when trade costs within the project are exactly the same as the trade costs otherwise incurred by the country-there is no additional effect. Only if τ Å ijt < τ ijt would we expect a partial effect of aid on bilateral imports. Hence, if donor and recipient have comparatively low organizational transaction costs, the effect of aid should be comparatively small.
The allocation effect implies a relationship between real consumption and trade that differs from the aggregate effect. As explained in section 1, in the absence of a bilateral effect, a transfer leads to an increase in donors' exports and recipients' imports. This is driven by primary income and terms of trade effects associated with a decline in factory gate prices p it . Both effects are associated with a decline in donor real consumption mirrored by an increase in recipient real consumption. The allocation effect increases the recipient's imports from the donor and thus the donor's exports, as does the aggregate effect. But this increase in exports leads to an increase in the donor's factory gate prices and real consumption. The question of whether the increase in the recipient's imports from the donor constitutes a real consumption gain for the donor depends on which effect prevails. For the recipients, on the one hand, the allocation effect implies that their factory gate prices increase less than they would otherwise in response to an impartial transfer. On the other hand, recipients benefit from lower trade costs.

Estimation strategy
In section 3.2, there are two parameters of interest that affect recipients' imports, γ and δ ijt , with different effects on welfare. We employ a two-stage estimation procedure to identify these parameters. The first step consists of estimating a version of equation (8), the net imports equation. This equation identifies γ, which measures the effect of aggregate aid on aggregate domestic absorption or the "absorption ratio" (Hansen and Headey 2010). The second step consists of estimating a standard bilateral gravity model of trade to identify δ ijt . As mentioned above, the income effect of aid and the effect on net imports are the same irrespective of the size of δ ijt according to equation (11). Instead, δ ijt affects only the allocation of spending after the aid inflow. In order to estimate δ ijt in a theory-consistent way, we specify a standard gravity model conditioned on total exports and imports.
In the first stage, the net import equation, there are other reasons, unrelated to development aid, why expenditure may differ from market income. Following Yotov et al. (2016), we specify these residual differences as proportional to market income by a factor θ jt > 0. For θ jt > 1 country j spends more than its income and for θ jt < 1 country j spends less than its income. We write E jt = θ jt y jt + γT F jt . Furthermore, we use GDP as a scaling factor. Then, equation (8) becomes Equation (12) explains net imports as a function of total aid receipts. Empirically, (θ jt − 1) is an error term that consists of an individual (η j ) and a time (ϑ t ) fixed effect component and an idiosyncratic component u jt . Moreover, we use three-year averages in order to reduce the influence of business cycle variation, in accordance with Temple and Van de Sijpe (2017).
As mentioned above, equation (12) is a reduced form equation. All indirect effects of a higher ratio of aid to GDP are ascribed to T F jt /y jt and would not imply a bias. Endogeneity becomes a concern, however, if exogenous changes in the rate of external saving or other components of the balance of payments affect net imports, which in turn trigger aid inflows or outflows. This line of argument is plausible mainly in episodes of current account crises and would typically exert a downward bias. A decrease in net capital imports, leading to a corresponding decline in net merchandise imports, could trigger a financial crisis. This would mean that a collapse in net imports would lead to an increase in foreign assistance and would imply a negative relationship between aid and net imports. If this is the case, the OLS estimation will produce a downward bias in the coefficient of aid. In many cases of current account crises, the IMF in coordination with some donor countries provided concessional loans to smooth the decline in other inflows. We exploit this role the IMF plays and control for the ratio of IMF aid to GDP in order to address this type of endogeneity. We also perform a robustness check using a similar instrumental variable (IV) approach as Temple and Van de Sijpe (2017). The estimateŝ γ provide the basis for our bilateral and general equilibrium analysis that extends the scope of Temple and Van de Sijpe (2017).
Thus equipped with an estimate for γ, we proceed to the second stage. Following the notation of Larch et al. (2019), we rewrite equation (11) as where λ it are exporter-year and ψ jt are importer-year fixed effects, μ ij are country-pair fixed effects controlling for time-invariant trade cost determinants (Baier and Bergstrand 2007) and φ ij are country pair-specific trends, z ijt is a vector of control variables and ijt is a random error term. Before proceeding with the estimation, we have to deal with the fact that our parameter of interest δ ijt still has a non-linear effect after log-linearization. We circumvent this problem by approximating ln(1 + δ ijt tf Å ijt /(y jt +γT F jt )) by using δ ijt ln(1 + tf Å ijt /(y jt +γT F jt )) as in Hansen and Rand (2014) in order to get an estimate for δ ijt . This approximation performs well compared to standard linear approximations. 5 We will refer to the term (1 + tf Å ijt /(y jt + γT F jt )) as the bilateral expansion factor. We construct this factor using the estimateγ obtained from estimating equation (12). In addition, we will test the sensitivity of our results with respect to the size ofγ. Finally, in order to identify δ ijt , we have to impose some restrictions. We start by imposing 5 One alternative approach to linearization would be to use first-order Taylor series expansions. Comparing our approximation with first-order Taylor series expansions around zero and one it turns out that for plausible values of δijt our approximation always performs slightly better than one of them and slightly worse than the other. Given that there is no a priori reason to prefer one centre of the expansion to the other, our approximation is a reasonable alternative. It has the additional advantage of consistency with the recent literature Rand 2014, Martínez-Zarzoso et al. 2017, for example).
δ ijt = δ∀i, j, t. Later on in the analysis, we will relax this assumption and examine whether δ ijt varies with trade costs, as suggested in section 3.2. After applying these changes our baseline specification is The control variables include a dummy for regional trade agreements (RTAs) between i and j, a dummy for both countries being WTO members and a currency union dummy. One concern in the estimation of equation (14) is that higher import shares could trigger more bilateral aid inflows (Osei et al. 2004, Younas 2008. We argue that this association is likely driven by the predicted part of trade and not by temporary shocks. Donors are unlikely to change their development cooperation in response to short-run fluctuations in their import share unless they are perceived to mark a permanent shift. For this reason, we include bilateral fixed effects μ ij , following Baier and Bergstrand (2007), and bilateral trends φ ij that capture long-term and predicted changes of bilateral trade flows, following Baier et al. (2014). For instance, the fixed effects control for time-invariant confounding factors and the bilateral trends control for the possibility that unobserved trade costs are constantly decreasing (or increasing) over time within a country pair. 6 We estimate equation (14) using the Poisson pseudo-maximum likelihood (PPML) estimator as advocated by Santos Silva and Tenreyro (2006). In particular, we employ the iterative process proposed in Larch et al. (2019) to enable the inclusion of high-dimensional fixed effects. 7 One crucial advantage of the PPML estimator, as shown by Fally (2015), is that it produces theoryconsistent estimates for the multilateral resistance terms if importer-year and exporter-year fixed effects are included. The reason is that in PPML introducing fixed effects is tantamount to conditioning on the total exports and imports. This property also guarantees consistency in the estimation of equation (12) and (14). Since net imports are kept constant in equation (14), we can be certain that net absorption effects and allocation effects will not be conflated. Another advantage of the PPML estimator is that it allows for zero trade flows (Santos Silva and Tenreyro 2011). 8

Comparative statics
In accordance with the gravity literature (Yotov et al. 2016), the estimation procedure outlined above identifies key parameters of the structural gravity model by imposing specific non-linear constraints. These constraints comprise the multilateral resistance terms and the market clearing condition. While they allow unbiased parameter estimation, the results can only be interpreted as partial equilibrium effects. The secondary effects of a transfer and effects on third countries, however, are general equilibrium effects that operate through changes in these constraints. In order to gauge the magnitude and direction of these effects, we therefore perform counterfactual analysis in the spirit of Dekle et al. (2007). This analysis also allows us to compute the implications of aid transfers for the real consumption of every country given our parameter estimates.
We define two counterfactual scenarios. First, in scenario 1, we consider a complete abolition of all foreign assistance. Second, under scenario 2, we consider the case where all bilateral aid flows in the world are set to zero, except those that include the country in question either as a donor or as a recipient. 9 Thus, in our first counterfactual scenario the recipient suffers from a direct reduction of its own income, due to the primary income effect and the subsequent adjustment of its prices due to a terms of trade effect. Additionally, the bilateral effect reduces trade costs vis-à-vis the donor, which also affects prices, and the transfers between other country pairs affect the recipient's market clearing condition. The purpose of scenario 2 is to determine the importance of transfers between other country pairs in the overall effect. All flows that are abolished under scenario 2 are also abolished under scenario 1, but in scenario 2, the recipient in question keeps foreign aid, and is only affected by the abolition of the transfers between other country pairs; that is, a shift in demand between foreign markets. This way, we identify the extent to which third countries benefit or lose from transfers. We can assess the importance of such third-country effects by comparing the figures from scenario 2 to scenario 1.
In both scenarios, we hold the quantity of production fixed such that y it = p itqit . Following Dekle et al. (2007) and Baier et al. (2019), we base our counterfactual analysis on the market clearing condition, holding world GDP constant. For any variable x, x denotes its counterfactual value andx = x /x. Then, we can rewrite equation (7) as From there, using equation (2), one can derive the counterfactual equilibrium, which is characterized by two equations: andP We compute the counterfactual valuesp it andP jt using the same iterative process as in Baier et al. (2019). First, we plug in tf ijt and T F jt and calculate the counterfactualp it for all countries, first holding P jt constant. Then, we calculate the impliedP 1−σ jt from equation (17). Again, this has repercussions on the equilibrium value forp it and, thus, we iteratively calculate the values ofp it andP jt until the process converges.
Finally, we calculate the counterfactual change in real consumption, which is given by

Data
The models are estimated using data for a balanced panel of 132 countries over the period from 1995 to 2012 (see the list of countries in table A1 in the appendix). 10 Bilateral imports of goods and total exports and imports of goods and services are taken from UNCTAD. Data on income variables and population are taken from the World Bank (World Development Indicators Database 2015). 11 The dummies for RTAs in force and for currency unions (CU) are from de Sousa (2012). 12 WTO accession dates used to construct the WTO membership dummy are taken from the WTO website. 13 Data on aid flows are obtained from the OECD's Development Assistance Committee. We use total aid received (including multilateral aid) for the net imports equation. At the bilateral level, we focus on direct bilateral transfers in the gravity 10 We exclude all territories that are not countries, and countries that are missing trade data for one year or GDP data. Moreover, we drop countries with a population under 1.5 million and countries that export more than they produce at any point in our sample period.
12 We updated it to include RTAs notified to the WTO after the publication of de Sousa's (2012) data using the WTO's Regional Trade Agreements Information System (RTA-IT).  (2012), we construct internal trade flows as the difference between GDP and total exports. 14 Table 1 presents the main results for the first stage (equation (12)) and provides estimates for our first parameter of interest γ. We report results for different dependent variables: In columns (1) and (2), we use net imports of goods; in columns (3) and (4), we use net imports of services; and in columns (5) and (6), we use the combined net imports of goods and services.

Main results
In columns (1), (3) and (5), there are no other control variables apart from the fixed effects. In columns (2), (4) and (6), we add the ratio of assistance from the IMF in relation to recipient GDP to mitigate reverse causality. We find a positive and statistically significant effect of development aid on net imports of goods (columns (1) and (2)). For net imports of services (columns (3) and (4)) the coefficient is not statistically different from zero. As expected, results in columns (5) and (6) indicate that the effect of development aid on net imports of goods and services is positive and significant and comparable in magnitude to the effect on net imports of goods. Note that under the assumptions of the model, γ can be interpreted as the effect of a 1 USD increase in development aid received on net imports measured in USD. According to column (1), a 1 USD inflow of development aid increases net imports by 0.28 USD. When controlling for aid received from the IMF, the point estimate increases to 0.357 USD (column (2)). Aid received from the IMF is statistically significant and as expected bears a negative sign when using net imports of goods as the dependent variable. Aid received from the IMF does not exert a statistically significant effect on net imports of services.
These results imply that 36% of aid received is spent on goods in the recipient country. This figure is notably lower that reported by Temple and Van de Sijpe (2017), who find effects of between 54% and 100%. The disparity is found to be mainly due to the time period covered. Estimating the equation for different time periods, we find that the coefficient is in the range of the results reported by Temple and Van de Sijpe (2017) if we consider the period 1970 to 1995. 15 Table 2 reports results for the second-stage estimation and provides estimates of our second parameter of interest δ ijt . For the construction of NOTES: t-statistics in parentheses. + p < 0.10, *p < 0.05, **p < 0.01, ***p < 0.001. Estimation of equation (12). All regressions include year fixed effects and country fixed effects. γ is the coefficient on total net aid receipts divided by recipient GDP. γ IMF is the coefficient on aid received from the IMF divided by recipient GDP.
the bilateral aid expansion factor, we use a value of γ = 0.357 from column (2) of table 1. All estimations are performed using the PPML estimator and include importer-year and exporter-year fixed effects. We report t-statistics based on country-pair clustered standard errors in parentheses and t-statistics based on multiway clustered standard errors in brackets. We should find a significant effect of the bilateral expansion factor at the bilateral level if aid affects not only the total expenditure of the recipient country but also changes the allocation of this spending in favour of the donor. In our baseline specification in column (1), we include bilateral trends and country-pair fixed effects in order to control for the possibility that donors may reward their trading partners with aid. The coefficient δ is statistically non-significant at all conventional levels, irrespective of whether country-pair clustered or multiway-clustered standard errors are used. 16 In columns (2) and (3), we use less conservative estimations. First, in column (2), we remove bilateral trends. On the one hand, bilateral trends may capture potential endogeneity. On the other hand, they may swallow the effects of development aid if trade responds mainly to long-run changes. However, the effect remains nonsignificant at conventional levels. When removing country-pair fixed effects in column (3), we find a statistically significant effect when using country-pair clustered standard errors. Using multiway clustered standard errors, the effect is still statistically non-significant.
As for control variables, RTA has a positive effect, which is significant at the 5% level when using country-pair clustered standard errors and at the 16 The value for γ used to construct the bilateral expansion factor has little effect on the results of any variable. Table A3 in the appendix reports results using different values of γ. The effect remains non-significant and is quantitatively similar. NOTES: t-statistics based on country-pair (multi-way) clustered standard errors in parentheses (brackets). + p < 0.1, *p < 0.05, **p < 0.01, ***p < 0.001. Estimation of equation (14). All regressions include importer-year and exporteryear fixed effects and were estimated using PPML using the Stata command ppml_panel_sg by Larch et al. (2019). Time invariant controls include the log of distance, a common colony dummy and a common ethnic language dummy. The same variables have been interacted with the bilateral expansion factor to obtain δ Comm.Lang. ij , δ Colony ij and δ RT A ijt .
10% level when using multiway clustered standard errors. We do not find a statistically significant effect on bilateral trade of either WTO membership, in line with Rose (2004), or of a currency union, in line with Larch et al. (2019). In section 3.2, we showed that according to theory the size of δ ijt depends on the difference in trade costs within an aid project managed by the donor and other demand from the recipient. Since transport can reasonably be expected to be the same, the difference should be largely due to differences in organizational and search costs. If the trading partners share a common language, have historical colonial ties or have formed an RTA, these costs are likely already low and we should expect a lower effect of aid. In order to see if this is driving our results, we interact the bilateral aid expansion factor with dummies for a common language, past colonial relationship (both from CEPII) and for an RTA. In fact, as reported in column (4), we now find a positive and significant effect of bilateral aid on trade of a magnitude of 3.161. This effect, however, becomes non-significant when a common language, a past colonial relationship or an RTA is present (see the lower panel of table 2). In assessing the size of the effect and in our general equilibrium analysis, we will thus useδ ijt = 3.161 There are different ways of assessing the economic size of our estimates from tables 1 and 2. While the bilateral effect is merely an allocation effect and does not exert an independent influence on overall net imports, it can affect bilateral elasticities. From equation (11), it follows that the elasticity of trade with respect to bilateral aid consists of a budget effect on total imports and a relative project effect. The elasticity is not constant and depends positively on the importance of bilateral aid in the overall budget. 17 For recipients, we can write ijt / y jt + γT F jt (+ general equilibrium effects).
(20) Table 3 provides summary statistics for the share of bilateral aid from any given donor in the recipient's overall budget in row (1) and estimates of elasticities of bilateral trade with respect to bilateral aid in row (2). To gauge the importance of bilateral effects on bilateral elasticities, we calculate the ratio of elasticities under different assumptions. We compare bilateral elasticities calculated based on our estimates to bilateral elasticities calculated assuming no bilateral allocation effect (δ ijt = 0). Finally, we calculate the absolute effects in monetary terms that our estimates imply. We useγ = 0.357 as in column (2) (4)  17 Note that this specification also implies that the elasticity of trade with respect to GDP is not constant. Instead, we have for T Fjt > 0 that the elasticity of trade with respect to GDP will be smaller than 1: d ln xijt d ln yjt = yjt yjt + γTjt (+ general equilibrium effects).
The reason for this is simply that the elasticity with respect to the overall budget is equal to one in (3) and (11). Since the importance of GDP and aid in the budget depends on how large the other part is, the elasticity of trade with respect to each part of the budget cannot be constant.  (1)), elasticities of trade with respect to aid (row (2)), the elasticity of trade with respect to aid given that δ = 0.84 divided by the elasticity of trade with respect to aid given that δ = 0 (row (3)) and the effect of bilateral aid on bilateral trade in monetary terms (row (4)). Elasticities are partial equilibrium effects calculated according to (20) excluding general equilibrium effects.
Our calculations suggest that bilateral aid from a single donor accounts for up to 15% of the recipient country's budget according to row (1) of table 3. Elasticities for donor country imports summarized in row (2) range from just above zero to 0.36 in some cases. The bilateral effects contribute substantially to the magnitude of these elasticities. According to row (3) of table 3, these bilateral elasticities are higher by a factor of 7.67 compared to elasticities the model would imply under δ = 0 in the absence of bilateral allocation effects. Nonetheless, row (4) indicates that most donors increase their bilateral exports by less than their bilateral donation. The direct bilateral effects of 0.003 USD for the median and 0.01 USD on average seem low if compared to results from table 1, according to which 1 USD of aid increases the recipient's aggregate net imports by 0.357 USD. This suggests that the bilateral allocation effect of development aid is not strong enough to overcompensate the negative income effect for the donor. Our comparative statics exercise in section 5.4 confirm this. Table 4 reports robustness checks for the first-stage estimation of our parameter γ. First, the effect of aid on net imports may be different for recipients and donors. In order to check whether that affects our results, in columns (1) and (2), we keep only net recipients of development aid. For net imports of goods the point estimate increases by around 0.05 and becomes statistically significant at the 0.1% level, whereas for services it remains non-significant. Next, in columns (3) and (4), we allow for country-specific trends to control for the possibility that long-term increasing trends in net imports, financed through means other than aid, may crowd out foreign aid. 18 The coefficient  (12). t-statistics in parentheses. + p < 0.10, *p < 0.05, **p < 0.01, ***p < 0.001. All regressions include year fixed effects and country fixed effects. γ is the coefficient on total net aid receipts divided by recipient GDP. γ IMF is the coefficient on aid received from the IMF divided by recipient GDP. Country trends were implemented using the RGFD method (Wooldridge 2010, pp. 375-377). 1 st stage F reports the first stage F-statistic on the excluded instrument for the control function approach. Under ID reports the p-value of the Kleibergen and Paap (2006) rank test.

Robustness checks
for goods becomes smaller, around 0.28, but remains significant. In equation (12) the effect of aid on net imports is assumed to be constant. We relax that assumption in columns (5) and (6) and estimate a random coefficient model assuming γ jt ∼ N γ, σ 2 γ . The results remain similar and we obtain an estimate for the varianceσ 2 γ that is indistinguishable from zero. All in all, point estimates for γ seem reasonably stable. Aid received from the IMF is statistically significant in columns (1) and (5). For goods, it always bears the expected negative coefficient. As before, we do not find a statistically significant effect of aid on net imports of services.
Finally, in columns (7) and (8), we use a control function approach to address remaining endogeneity concerns. We follow and Van de Sijpe (2017) in constructing a synthetic measure of aid using historical bilateral aid shares between 1960 and 1969 and current aid budgets. The point estimate for net imports of goods increases to 1.057. However, it becomes statistically nonsignificant. Moreover, according to Wooldridge (2015), the control function approach provides a heteroskedasticity-robust version of the Hausman test of exogeneity. We cannot reject the null hypothesis that the first-stage residual has no effect on net imports. By the same token, we cannot reject the null hypothesis that T F jt /y jt is exogenous.
pp. 375-377). However, aid disbursements may follow a trend because many projects involve long-term planning in their implementation. Removing the trend may emphasize the role of short-run deviations from that trend and thus shift the focus to very specific types of aid. Interesting conclusions may still be derived from detrended models. Table 5 reports robustness checks for the second stage. In order to see whether including zeroes affects significance, we drop those observations in column (1). This increases point estimates and has minor effects on t-statistics. The effect of aid on trade remains significant unless countries share a common language, a past colonial relationship or are members of the same RTA. As a next step, we control for the bilateral reporting gap in column (2) (Kellenberg and Levinson 2019). Bilateral aid may lead to a better alignment of statistical practices and hence reduce the differences in reported trade values which could bias our results. Introducing bilateral reporting gaps does not affect our results. Neither does introducing a non-aid dummy as in the previous literature (e.g., Wagner 2003) in column (3). Another problem could be that trade between donors adds too much noise. In order to see how development aid affects imports, it may be preferable to include only importers that are a net recipient on average, as shown in column (6). Again, the effect of aid is only significantly positive in the absence of a common language, a past colonial relationship or an RTA. The point estimate is higher than in column (4) of table 2. Moreover, the interaction between RTA and the bilateral expansion factor is now statistically significant when using simple clustered standard errors. This does not, however, affect any of our conclusions.

Comparative statics
In this section, we simulate two counterfactual scenarios including secondary effects of aid based on our estimates and the structural gravity model as outlined above. Throughout, for the elasticity of substitution, we will assume σ = 5 based on the estimation by Fontagné et al. (2018),γ = 0.357 as in column (2) of table 1 andδ ijt = 3.161(1 − Comm.Lang. ij )(1 − Colony ij ) (1 − RT A ijt ) as in column (4) of table 2. Our first and main counterfactual scenario is a world in which all aid flows are set to zero (tf ijt = 0 ∀i, j, t). In the second scenario, we investigate the importance of third-country effects for any country l. We do this by running separate simulations for each country l where all bilateral aid flows that do not include l either as a recipient or donor are set to zero, that is, tf ijt = 0 if i = l and j = l. These flows are also abolished under scenario 1 and scenario 2 merely disentangles the role that third-country effects play in the counterfactual abolition of aid. 19 The main results for the first scenario, a complete abolition of aid relative to the actual situation, are shown in figure 1. Table A4 in the appendix provides the exact figures for simulated changes in factory gate prices, real consumption and aggregate exports averaged across the sample period for all countries in our sample for both scenarios. Figure 1a depicts the implied percentage changes in aggregate exports. As mentioned above (see section 3.2),  The increase in exports goes hand in hand with a decline in real consumption for recipients. The four countries that lose the most in terms of real consumption (Burundi −8.79%, Mozambique −7.16%, Rwanda −6.87% and Sierra Leone −6.99%) are also among the top 11 countries in terms of relative increases in exports (Burundi +30.87%, Mozambique +8.44%, Rwanda +26.69% and Sierra Leone +14.17%). Moreover, in all but one case non-European recipient countries that see their exports increase receive a lower price for their exports.
In the first scenario, the effects we obtain are total effects comprising primary and secondary effects of the transfer, bilateral allocation effects and third-country effects, as discussed above. In order to assess the role of the secondary and bilateral allocation effects on real consumption, we first construct a variable that captures primary effects. Without price effects, P = P , we have Δw j /w j = −γT F j /E j . Since we used γ = 0.357 from table 1 to construct our counterfactual scenario, the primary effect of a complete abolition of aid would be Δw j /w j = −0.357 × T F j /E j . As already explained, in our model the secondary effects reinforce the primary effect, while bilateral allocation effects may reduce the burden of the donor. To evaluate which effect prevails, we first regress the counterfactual real consumption effects from our first scenario against the average ratio of aid to expenditure T F j /E j . If there are no secondary effects, the coefficient should equal (−γ) = −0.357. A smaller coefficient would suggest that secondary effects are on average stronger than bilateral allocation effects. Conversely, a coefficient larger than −0.357 would suggest that the bilateral allocation effects outweigh the secondary effects on average. Using the sub-sample of donors, we get According to the results in expression (21), aid received explains more than 99% of the variation in the welfare effects. However, the absolute value of the point estimate is 6% larger than −0.357 and statistically different, indicating that on average the bilateral allocation effects are not strong enough to offset the secondary effects for donors. This implies that despite the bilateral allocation effect, on average donors' terms of trade improve following an abolition of aid. For recipients, who benefit from secondary effects of the transfer, the corresponding coefficient is −0.4009-that is, 12% larger in absolute terms than −0.357. As a result, they are also hit harder by an abolition of aid than the pure income effect would suggest.
To assess the role of third-country effects, we turn to scenario 2. Results for the simulation are reported in table A4 in the appendix. In addition to counterfactual changes in exports, prices and real consumption, table A4 reports in its last two columns the relative importance of third-country effects compared to scenario 1 for exports and real consumption-that is, it reports the ratio of counterfactual effects in scenario 2 to counterfactual effects in scenario 1. Since the only difference between scenarios 1 and 2 is that there is no primary income effect in the latter, this comparison allows us to evaluate the extent to which third-country effects drive the counterfactual changes in the former. As mentioned above, in some cases third-country effects can have a substantial effect on exports under scenario 1.
In terms of real consumption, third-country effects play a smaller role on average. One key determining factor of whether countries will benefit from third-country effects is whether they are net exporters to donors or recipients. Net exporters to recipients stand to lose because the destination markets shrink. This loss can be compensated if they are also net exporters to donors, where the markets expand. On the other hand, net importers from recipients can benefit from lower prices, whereas net importers from donors will have to pay higher prices. Table 6 shows the share of beneficiaries from third-country effects, distinguishing between net exporters and net importers to donors and recipient, respectively. If all third-country aid flows are abolished, 70% of net exporters to donors gain, whereas only 56% of net importers from recipients do. Out of the countries that are net exporters with respect to donors and net importers with respect to recipients, 87% stand to benefit from third-country effects.

Conclusions
In this paper, we propose a new two-stage procedure to disentangle the effects of development aid on trade flows. We augment the gravity model by Anderson and van Wincoop (2003) by first including foreign development aid as a transfer of disposable income and then allowing for bilateral effects in the gravity model. The model comprises three types of effects: a primary income effect, a secondary terms of trade effect due to the geographical relocation of demand, and a bilateral trade cost effect that counteracts the secondary effect.
We propose a way to discern overall budget effects of a transfer and bilateral effects that change the import shares. The theory suggests that the budget effect is the effect of overall aid on net imports, whereas the bilateral trade cost effect is the effect of bilateral aid on bilateral imports. We implement this two-stage procedure using a fixed effects estimator explaining net imports in the first stage. In the second stage, a gravity model is estimated using a PPML estimator with high-dimensional fixed effects.
The empirical results obtained in the first stage suggest that 1 USD of aggregate foreign development aid increases net imports on average by around 0.36 USD. This effect is statistically significant and robust to changes in the specification. At the bilateral level, our results suggest that trade cost effects only play a role for country pairs that do not have historical (colonial past), cultural (common language) or political (RTA) relationships. This could suggest that aid reduces organizational costs.
Finally, we compute comparative statics for two counterfactual scenarios in order to assess real consumption gains and losses due to transfers. First, we simulated the complete abolition of aid. In the second scenario, we abolish aid for all countries except the given bilateral link. According to our simulation of the first scenario, donors benefit not only from a higher income, but also from an improvement of their terms of trade. This implies that despite the bilateral effects of a transfer in favour of the donor, the secondary terms of trade effect of a transfer is negative. Results from the second scenario show that third-country effects play a smaller role for real consumption. Net importers from recipient countries and net exporters to donors stand to gain if all other countries' aid is abolished.
One limitation of our simulation is that we do not consider dynamic effects and the effects aid may have on the distribution of power and institutions within the recipient country (Bräutigam and Knack 2004). Adding effects on capital accumulation and infrastructure (Calì and te Velde 2011) could be a fruitful avenue for future research. Since the proposed theoretical model is stated in general terms, it is in principle applicable for other types of transfers. We leave for further research the application of the model to international remittances.    1937 30,1937 30,1937 301937 30,1937 30,1937 NOTES: t-statistics based on country-pair clustered standard errors in parentheses. t-statistics based on multiway clustered standard errors in brackets. + p < 0.1, *p < 0.05, **p < 0.01, ***p < 0.001. Estimation of equation (14). All regressions include importer-year and exporter-year and country-pair fixed effects and country pair-specific trends. All regressions were estimated using PPML using the Stata command ppml_panel_sg by Larch et al. (2019). δ is the coefficient on the bilateral aid expansion factor ln (1 + tf ijt /(y jt + γT F jt )).

ΔW F
(1) i.  (16), (17) and (18) using σ = 5. We report the difference in the respective statistics vis-à-vis the actual situation, for aggregate exports (X i ), factory gate prices (p i ) and welfare (W F i

Supporting information
Supplementary material accompanies the online version of this article.