Applying Gravity Model to Analyse Trade Direction

The application of Newton's law of gravity in explaining international trade proved to be very successful. The popularity of a gravity model for explaining trade flows has been due to the fact that the calculations require affordable data for every economy. The basic elements of the panel gravity model are mainly GDP, population and distance. This paper analyses Serbia's trade from 2001 to 2018 based on the experience of neighbouring countries of Croatia and Romania, using STATA software. The trade exchange with more distanced EU members is less realized. The country tends to trade much more with its neighbouring EU members, proving the basic assumption of a gravity model. There are exceptions regarding some parts of the trade with developed EU economies, regardless of their distance. These relations will help us to evaluate the trade pattern and direction of Serbian trade in the EU accession process using a gravity model.


INTRODUCTION
The preconditions for the expansion and development of the trade of an economy imply the access to new markets. Modern trends encourage a country to join a regional integration. Nowadays, less than 200 countries participate in nearly 300 regional integrations of different forms and levels of integration. The economic motives relate to the coordination of trade flows between economies as the lowest level of regional integration (formerly NAFTA, CEFTA), as well as those that involve a higher level of connection through the processes of the coordination of monetary and fiscal policies (such as the EU). Basically, a regional integration is a useful instrument for depreciating external shocks; eliminating speculative attacks; avoiding uncertainty regarding exchange rate; ensuring higher price stability, and security of investments as well; reducing the required level of foreign exchange reserves, etc. In addition to the positive effects, the negative ones are reflected in the loss of a part of monetary policy instruments and foreign exchange policy. Therefore, every economy should consider both the benefits and costs of entering a regional integration.
Commonly, the best candidates for a regional integration are neighbouring economies of a similar structure, features and size of the economy, well-connected with transport links, and transactions in commodity and financial sectors. Therefore, the degree of openness of an economy becomes a dominant criterion (along with diversified production, financial integration and mobility of a production factor). As for openness, the crucial thing is that significant effects of trade creation and trade diversion are made within a regional integration. Consequently, the regional integration enables greater exchange, lower production costs, specialization, sectoral agglomeration, etc.
The aim of the paper is to consider and analyse the structure of Serbia's trade with EU members. The idea is to use the experience of the neighbouring countries Croatia and Romania, in the period before they became full members of the EU. In the research, we used the panel gravity model for the period 2001-2018. To assess the effect of the trade we use the gravity model based on the data from the panel series. Newton's law of gravity proved very successful in explaining international trade. The popularity of the gravity model for explaining trade flows of any economy is due to the fact that relatively simple and easily accessible data are needed for the calculations. A panel models take into account both country and time effects. The rating of the panel, in relation to cross-section data and time series data, offers greater variability and a higher degree of freedom and reduces the collinearity among the explanatory variables. The combination of cross-section data and time series data increases the sample size. This helps us to analyse the structure of trade and changes in trade over time.
What is the reason for redirecting trade exchange towards the economies belonging to regional integrations, in our analysis towards the EU? The answer is simple -the access to a potentially larger market, higher purchasing power of the population and more intensive production process. Purchasing power has a significant role in terms of demand, both for domestic and foreign products. Foreign demand is reflected in the export of domestic economy, especially if there is high elasticity of demand for domestic products and it can have impact on domestic GDP, and vice versa. The distance between trading partners does not play a significant role in trade, as it used to be in the past, because transport costs are far lower.
In order to achieve these objectives, a theoretical analysis of the panel gravity model is provided in the beginning of this paper. The literature review includes experiences of numerous of success research papers from this field, as well as detailed description. Next, the methodology and regression model are elaborated using experiences of neighbouring countries. Finally, the conclusion remarks are discussed. The appendix is at the end of the paper.

LITERATURE REVIEW
The openness of an economy is vital for all countries, regardless of the level of its development. Evidently, large economies are relatively less open, as they manage to reach economy of scale within their own borders (e.g. Germany). On the other hand, a small and developed economy (e.g. Luxembourg), depends to a large extent on international trade. Due to the scarcity of its natural resources and its small market, it cannot achieve economy of scale within its borders. In developed market economies, trade growth is based on GDP growth through the growth of productivity, innovation, invention, and capital-intensive production process. For less developed economies other rules apply.
The latter achieve the largest volume of goods and service trade with neighbouring economies. Therefore, the effect on the trade is more profound when a neighbouring economy is more developed and has a larger market. However, the benefits of such economies sometimes become less relevant, compared to developed regional integrations. Hence, economies join different regional integrations, such as Croatia or Romania in the European Union, as it is the case with Serbia.
Small open economies, such as Serbia, are characterised by the unfavourable structure of trade exchange with an inadequate structure of production factors (workforce which does not meet the market demands and insufficient capital), several production sectors (usually with outdated technology) and business operations in imperfect competition. Under such business circumstances, for less open economy, achieving economy of scale is crucial. Therefore, the growth of trade in these economies has to be accompanied by the fragmentation of production outside their borders [2,3]. In the analysis of Belarus export, it is stated that the structure of export of a less developed economy is significantly different from the structure of export of a developed economy (the results in the gravity model differ from the results of developed economies); production is located in special places which makes the access to foreign markets more difficult; the supply of less developed economies does not depend on the purchasing power of the population of developed countries, while distance significantly reduces trade in developed economies, which does not have to be the same case with less developed economies. Chan-Hyun [4], in the case of the Korean trade, showed that trade flows in bilateral trade increase with a size of GDP of trading partners and decrease with their distance. Similarly, trade analysis between blocks [5] and [6] shows that the size of the country is directly related to trade and larger countries have a higher absorption capacity. In the case of Czech agricultural production, Shevel [7] points out positive impact of GDP, negative impact of GDP per capita and distance on the volume of export of Czech agricultural products to the EU economies.
Numerous research papers explain the effects of gross domestic product (GDP), population and distance in trade between countries [8,9]. These two papers explain how EU trade with the countries of the Western Balkans presents a significant factor for growth and overall economic activity. Montanari's paper [8] implies that trade policy and economic integration with the EU play an important role in shaping trade exchange for the Balkan countries. Whereas, the research paper of Braha et al. [9] suggests that trade has a positive impact on GDP, but it decreases when distance between trading partners increases. Gudin et al. [10] show that, with an unchanged GDP, in an economy with smaller population there will be lower trade volume. Therefore, in the model the population variable was replaced by GDP/population variable and demonstrated a positive impact of GDP per capita on foreign trade. Theoretically, in the gravity model, bilateral trade is positively correlated with the GDP of two countries, and negatively correlated with the distance between them.

RESEARCH DATA AND METHODOLOGY
In the literature, a gravity model has had a long history in international and regional economy. It has also been used in sociological science (social trends, population migrations, etc.). It is one of the most widely used tools for explaining bilateral trade. Numerous research papers explain the effects of different economic determinants (GDP, commodity prices, foreign direct investment, foreign exchange reserves, population, exchange rate, etc.). In many studies, GDP, GDP per capita, population and distance between countries are mainly present determinates [4,7,[11][12][13]. According to the theory of a gravity model, trade/export is positively correlated with GDP, positively correlated with GDP per capita of the importing country (trading partner), and negatively correlated with the distance between the two countries. Numerous analyses show that the effects of the population on trade are ambiguous [14,15].
The data used in the model are taken from official sources for all macroeconomic determinants -total trade, GDP of Serbia and trading partner countries, population of Serbia and trading partner countries, and the distance between the countries. It is important to note that in the analysis we presented the number of the members of the  The size or economic strength of the economy in the model is represented by gross domestic product (GDP). Population is taken as a measure of a size of the marketthe greater the market, the bigger trade exchange. In the model, geographical distance is used as a substitution for transport costs in foreign trade, export/import tariffs, dumping and other trade barriers. We expanded the model with two dummy variables, common border and common language, because through individual characteristics of the countries we wanted to study the mutual trade links of the neighbouring economies.
In order to evaluate the trade flows between Serbia and the member states of the EU, we used the gravity model, in which the impact of specific factors on the total trade was examined by regression equations with panel series. Panel series data is suitable for this type of regression equation estimation, since it allows simultaneous analysis of comparative data (N) and time series data (T). Thanks to the features of the panel series, the sample size increases (NT) and the number of information from a limited number of observations (sample) rises. Thus, the efficiency of the model estimation increases and better trade results are obtained. At the same time, the model features a higher degree of variability and a higher number of freedom degree, and lower degree of correlation between explanatory variables. The model also enables analysis of the structure of trade and changes in trade over time. The estimated results of the model should show the relationship between the size of the economy, purchasing power of the population and the distance, on the one hand, and total trade, on the other hand.
This complex analysis aims to evaluate the impact of GDP and the population on Serbia's trade with EU members by using the gravity model. Moreover, it aims to assess the impact of distance (distance between countries) on the volume of trade -whether greater distance poses a restriction to trade, or not. In the analysis, dummy variables are included in the model. The potential impact on the total trade of those economies that have a common border and similar, understandable language is tested and evaluated. A random effect model (RE) and a fixed effect model (FE) are used to evaluate the variables. In RE model, regression parameters with explanatory variables are invariant, while the variations per observation units and over time are covered by a random error (random variables). The FE model is based on standard assumptions that a random error uijt has a normal distribution (zero mean and constant variance), and that the explanatory variables are nonstochastic and independent of the error. It is common that a standard gravity model is evaluated by a FE model, but it may have a large deficiency -not to allow the assessment of market variables from the model. From the perspective of econometric analysis, the results of the Hausman test will show us what effects model (RE or FE) to use when testing and evaluating the coefficients with a model variable. According to the descriptive statistics, we have a total of 504 observations [N = 28; T = 18] in the model. For regression estimates, we used statistical software Stata S/E, version 13.0.

Gravity Model
The gravity model was named after Newton's law of gravity. According to this law, the force between two bodies is positively correlated with their masses (sizes) and negatively correlated with their distance. Generally speaking, the force of the interconnection between two bodies depends on their size and features, so if the bodies are larger and closer they are more interconnected. When the law is transferred to the relations in economics, we can say that the trade between economies is (positively) correlated with the size of the economy and (negatively) correlated with the distance between these economies.
The application of the gravity model is widespread because it is a model that explains the structure of trade and economic reasons for international trade. It was used in analyses of a wide range of products and factors of production even before the Second World War [5]. Tinbergen and Lineman were among the first to apply the model in the early 1960s, but Anderson and Bergstrand were the first to improve the model [16]. Numerous other authors have also shown a wide application of the gravity model by adding various trade restrictions to properly assess the model and the structure of the trade [6]. The most important application of the gravity model occurred with the acceptance of market conditions of operation in Central and Eastern European countries in the early 1990s, when the potentials of trade between West European countries and new market economies were analysed [7]. Helpman [17] stated that the gravity model gave good results in the countries that had a large volume of intra-industrial trade in mutual trade.
Having analysed previous researches, we have opted for the gravity model which can evaluate the parameters based on their comparative data and time series. Basically, such a model gives a more precise assessment of the parameters of a regression model. In earlier researches of gravity models which evaluated international trade between countries, total trade/export was used as a dependent variable. A set of independent variables was very broad: GDP, GDP per capita, population, a common language, a common border, customs tariffs, an area, exchange rate, culture and geographical distance [13,[18][19][20].
We begin the modelling of trade flows in a logarithmic-linear form in the following equation: where X ijt indicates the total trade of an economy i and an economy j in a year t; β vector parameter; X is a matrix logarithm of explanatory variables (independent variables) of the model; u ij is a common model error.
In order to simplify a statistical and econometric analysis, we are going to include a set of independent variables. Subsequently, the model will be developed in several stages. The following equation of the gravity panel model contains one dependent variable, total trade and three independent variables: GDP, population, and distance, represented in the Eq. (2): where, X ijt shows the total trade of an economy i and an economy j in a year t; BDP i (GDP j ) reflects GDP of the economy i and the economy j in a year t; POP i (POP j ) is the size of the market of the economy i and the economy j in a year t; DIST ij is a measure of distance between the capitals of these countries; F ij represents any other factors (variables) within the model; u ij is a random model error (it consists of individual and time effects, as well as errors).
Eq. (3) shows the linear relationship between several explanatory variables. The equation contains the variables whose values vary according to economies and time, as well as variables whose values vary across countries, yet being constant in time.
where, bord ij presents the common border between an economy i and an economy j, lang ij presents the common language between an economy i and an economy j. Before estimating the parameters, we should consider theoretical expectations of signs (+/−) of the estimated coefficients of the variables. The growth of wealth in an economy shows an increase in the level of production (output), purchasing power of the population changes, and the trade between the economies increases as well. Therefore, we can conclude that the coefficients before the variables -GDP of Serbia and EU countries, β1 and β 2 should be with a positive sign, with a greater impact of GDP of EU countries. The coefficients before the variables -population (β 3 and β 4 ) are ambiguous (with both positive and negative sign), depending on the effect of absorption and economies of scale. A negative sign is expected with the distance coefficient (β 5 ), since a greater distance between two economies increases the cost of the trade, and vice versa. A positive sign is expected in both artificial variables of the model (D ij ), because typically, trade exchange is achieved in a larger volume if partner countries share a common border (bord ij ) and/or speak the same language (lang ij ). In the appendix, the Table A1 shows descriptive statistics for all the variables included in the model.
In the process of evaluating the regression parameters of the model, firstly, the existence of individual effects is examined. If it turns out that there are no individual effects, it is recommended that a panel model should be used to evaluate regression. On the other hand, if there are individual effects within the model, then either a FE model or a RE model is used, depending on the degree of correlation between individual effects and variables of the model. According to Gujarati [21] and Dragutinović-Mitrović [22], the use of FE model is justified if there is a correlation between individual effects and explanatory variables. As a rule, the variables that do not change over time (distance, common border or common language) are left out. Unlike a FE model, the RE model is used when there is no correlation between individual effects and explanatory variables. Then the individual effects are random, and new explanatory variables (gender, border, distance etc.) are obtained through the residuals of each effect. With these last ones mentioned, a RE model gives more effective estimates. We will choose one of the two presented models (RE and FE) for estimating the parameters not based on the selected model variables, but by using the Hausman test we will determine which test gives more effective estimates [23].

RESULTS
Tab. 2 contains the regression estimates of the gravity model, according to Eq. (4) of the presented model, such as an OLS model, FE and RE models. The OLS models are efficient, but biased (neglecting individual heterogeneities within the model). In FE models, as a rule, variables that do not change over time (distance, border, common language) cannot be estimated by coefficients that accompany them. The heterogeneity of the explanatory variables is estimated by a RE model, so the parameters of all model variables are evaluated at the same time (whether or not they change over time).
We begin the analysis of an F-test by testing the nature of individual effects (fixed and random). According to the obtained value of the F-test statistics, we accept a zero hypothesis (H0: all the coefficients in the model are different from zero). Therefore, we can conclude that the set model is correct. The statistics indicate that there is a high degree of explanation of a dependent variable (Y) with independent model variables (the coefficient of determination R 2 and the adjusted coefficient of determination adj-R 2 have high values). The results suggest that a RE model is a better choice of estimates than an OLS model. The Breusch and Pagan Lagrangian multiplication test for a RE model gives estimates that are significant (we reject the hypothesis that there are no individual effects), which indicates that the model has lower efficiency (Chisquare = 166.76; Prob. = 0.0000). Accordingly, we confirm our choice -a panel regression model of RE. Below we are going to conduct several diagnostic tests to mitigate the assumptions of a RE model. Afterwards, we will test the heteroscedasticity of a FE model within which the variables of distance, border and language are omitted, because of the existence of collinearity. The obtained values of the Hausman's test display that there are significant differences in the coefficient estimates with variables (Ho: differences in coefficients are significant), leading to the conclusion that the application of a RE model is the best one (see Appendix). Tab. 2 shows that the estimated coefficients of model variables have the expected sign, as stated in the theory. The coefficient before the population variables has a negative sign because Serbian market is small, and within its own borders, Serbia fails to achieve the economy of scale. Distance (dis) has a high negative impact on the trade between Serbia and the EU-28. The variable common border (bord) is not statistically significant and has no effect on the bilateral trade between Serbia and the EU-28. The variable common language has a positive effect on the international trade. Ristanović et al. [23] obtained similar results on a smaller sample.
As stated above, the coefficient before GDP of Serbia (gdp) variable shows minor, but positive impact on the total trade of Serbia and the estimate in all three models is statistically significant. This indicates a lack of specialization in the production and diversification of products. The impact of the size of the EU trading partner country (gdp*) on Serbian trade is higher but still below 1%. Although the growth of foreign demand has intensified in recent years, the impact on Serbia's trade is low due to lower elasticity of demand for the product range from the Balkan countries, including Serbia. This means that a larger volume of trade with developed and wealthy economies, which typically spend more on trades (goods, services, intermediary goods), would significantly increase total trade which would in turn stimulate the growth of the economy (GDP).
The size of the market, measured by changes in the number of population, produces the expected results. The estimated coefficient with the population variable in Serbia (pop) has a major negative impact on the total trade. This is due to the stronger absorption effect. Conversely, there is a low impact of the EU population on the total trade in Serbia (pop*), and it is not statistically significant. This result is due to much larger volume of trade with non-EU economies, e.g. CEFTA countries, Russia, China.
The estimates of the OLS model and the RE model show that the sign coefficient of geographical distance (dis) corresponds to the expectations, and is statistically significant at the level of even 1%. The common border (bord) does not have a significant impact on the trade as opposed to the common language (lang), where the influence is stronger and statistically more significant. The low value of the coefficient border indicates that a common border is not necessarily a condition for a higher volume of trade. The reason for such results is found in the fact that transport costs have been significantly reduced and that communication has improved. This is confirmed by the example of Serbia, which achieves a greater volume of trade with EU countries that are farther away (Germany, Italy and others) than with its immediate neighbouring members of the EU (Romania, Bulgaria, Hungary, and Croatia). The common language variable has a coefficient with the expected sign and is statistically significant. This is the opposite conclusion compared to Ristanović et al. [23]. The reason for the discrepancy is found in the fact that in this model a wider concept of common language variable is used. Namely, we initially assumed that the border residents/entrepreneurs of certain countries can communicate more easily as they have similar languages (Serbia, Croatia, Slovenia, to some extent also Hungary and Romania; Slovakia and the Czech Republic; France-Belgium-Germany). According to this assumption, a larger number of the residents of these countries can be understood easily when exchanging goods and services. Furthermore, English is a business language, and an official language of communication within the EU. Hence, common language variable is statistically significant and produces a positive effect on the trade in the model. The obtained results unambiguously show that the total foreign trade is influenced by the size of the economy, population and geographical distance, but not a common border.

EXPERIENCES OF CROATIA AND ROMANIA
In Fig. 1, we note that Serbia has the most unfavourable structure of the economy and would suffer higher costs than the benefits of joining the EU market. A larger share of raw materials and resources does not secure economy's growth in the medium term, even when the state is in a regional integration. The economic policy makers in Serbia should, by themselves, enhance the technological intensity of the production process, strengthen the capacities of the economy and diversify the export assortment. It is important to emphasize the fact that the volume of the trade of Croatia and Romania, analysed individually, with EU countries increased with their EU membership compared to pre-accession period. Similarly, the value of goods trade with EU members rose. It means, a priori, that Serbia needs to adapt the commodity offer to the EU market as soon as possible, because within the EU market almost 2/3 of the total exchange is intra-industrial trade, that is, the exchange of technology-intensive products. This would certainly prevent high costs and increase the benefits of accessing. Therefore, prolonging of Serbia's accession to the EU should be smartly used and the supply of goods should be adjusted to the requirements of the EU market.
The structure of Romania's economy in the years before EU membership was more favourable than the structure of the economy of Croatia in the years before EU membership, as it is the case with Serbia now. Romania has further enhanced the structure of its economy through the membership in the regional integration. In Romania there was an increase in the share of capital goods at the expense of consumer goods, which is a prerequisite for the growth of the economy in the medium and long run. On the contrary, Croatia's economy had a better starting position before EU membership than it is today, and it is far weaker in the years of membership. The export mainly consists of products with low added value and labour-intensive products [24]. This proves that each state individually needs to manage its economy within its own capacity to gain substantial benefits from the costs of membership in a regional integration. It is not realistic to expect that an economy itself responds to the demands of the common market.
It means that a structure of an economy before full membership does not have to be the proof for future faster progress of the economy within a regional integration, as it can be seen in Croatia. On the other hand, the structure of Romanian economy is more in line with the EU market and in recent years it has been closer to more developed economies within the European Union. Hence, there are more benefits of the costs of joining the EU for Romania than for Croatia.
Let's now econometrically elaborate the abovementioned experiences and the results for Croatia and Romania with an additional analysis. We are moving on to econometric analysis of the trade flows of Croatia and Romania. We will use a gravity model in a regression analysis for both economies to evaluate (equation 4) the direction of the trade in the period of full membership in the EU. As for Romania we will analyse the 2002-2006 period, while for Croatia it is the period 2001-2013. Econometric data (Tab. 3) confirm the previous conclusions about the experiences of Croatia and Romania in the period of EU membership bid. In both countries there was a greater impact of domestic and foreign GDP on overall demand compared to Serbia. Moreover, in Romania, there was a greater impact of foreign demand, confirmed by the structure of products -a higher share of capital goods and intermediate products (Fig. 1). Hence, the population's impact on the total trade in Romania is not statistically significant. On the other hand, in Croatia and Serbia, the impact was high and negative, but statistically significant. The size of foreign markets (pop*) has no influence on any economy. Distance has the same negative impact on total trade, and it is statistically significant. This suggests that trade with distanced EU member states is not so widespread. Border has no influence, which is quite understandable, since in all three countries the most important foreign trading partners are developed economies of the EU. At the same time, the supply of neighbouring Balkan economies is not so diverse, while the preference for domestic consumption is more suited to developed economies and less available offer [24,25].

CONCLUSION
Using a dynamic econometric model, we evaluated the factors that showed the impact on the total trade of Serbia and EU member states. A gravity panel model proved to be a convenient approach to testing multilateral trade flows. We used the data from 28 EU economies and Serbian economy in the period 2001-2018. The results indicated that the size of the economy (GDP) and population (POP) play an important role in the trade of Serbia, while the geographical distance (DIST) has negative effects on the bilateral trade between Serbia and foreign trading partners from the EU. In addition, a common border (BORD) and a common language (LANG) also show positive effects on the bilateral trade. The obtained results indicate clear determination of Serbian economy to realise the largest volume of foreign trade with EU members. Moreover, the results imply that the trade of European neighbouring countries with the common border and language influences the increase in the volume of trade and it can represent a good basis for increasing the trade of Serbia with its neighbouring economies (EU members and CEFTA countries).
The experiences of Croatia and Romania clearly show that the structure of economy is vital for an economy that aims for a regional integration. As for Romania, we can see that the impact on total trade is more profound and there is a higher demand from abroad when the offer is adapted to the regional integration market.
The obtained model results are expected. The results of the paper show that it is necessary to expand its market beyond the size of the regional market and take into account the specific features of the trading countries. Therefore, a new concept of foreign trade is needed, which will include structural features of production, specialization of production and diversification of export. Such a concept is a prerequisite for faster economic growth and provides more benefits for less developed economies and helps to improve economic performance.