The impact of institutional quality on foreign direct investment: empirical analysis based on mediating and moderating effects

Abstract The purpose of this paper is to investigate the relationship between institutional quality and foreign direct investment (FDI) inflows using panel data of 42 G20 countries from 2005 to 2020. The results indicate a positive association between them. Mediating analyses reveal that institutional quality attracts FDI inflows by increasing trade openness, accelerating industrial structure optimization, and encouraging technological innovation. Furthermore, financial development, tax level, and natural resource abundance moderates the positive association between institutional quality and FDI inflows. Among them, financial development and natural resource abundance strengthen the promoting role of institutional quality in attracting FDI; the tax level weakens this process. These findings have implications for policymakers seeking to make full use of favourable institutions to achieve sustainable growth of FDI.


Introduction
With the boom in international activities in the world today, substantial regional economic cooperation organizations are being established as a manifestation of economic globalization and integration (Chen et al., 2021).In the process of building an open economy, the inflows of foreign direct investment (FDI) play a non-negligible role.For instance, FDI inflows are a strong driving force behind a nation's sustainable growth by promoting green technology innovation, enhancing labour productivity, and lowering carbon emissions (Vujanovi et al., 2021).Among various global agreement partners, the G20 countries rank first in attracting FDI.According to the World Investment Report, in 2020, the FDI, as a result of the COVID-19 epidemic, absorbed by the G20 countries still reached 6.24 trillion US dollars, accounting for 59.0% of the global FDI.Therefore, exploring the factors affecting the inflow of FDI for a specific economic cooperation area has become a heated topic in the field of international trade (Hou et al., 2021).
Accompanied by the rise of neo-institutional economics, substantial studies focus on institutional factors affecting FDI inflow.According to North (1989), an institution can broadly be defined as the set of rules and constraints that shape economic behaviour and incentives, which are key determinants of economic development.The institutional quality of the host country may affect economic activities in various ways and then affect the progress of building a worldwide open economy.Favourable economic institutions and high institutional quality are critical for establishing sustainable economic activities, such as improving the position in the global value chain, regional economic growth, and optimizing the business environment (Corradini, 2021).According to the World Bank WDI database, more than half of the top 30 countries in the global institutional quality ranking are G20 countries.Although G20 countries show the characteristics of 'high institutional quality, high FDI', regrettably, the relationship between institutional quality and FDI has not yet been fully explored, which fails to provide empirical evidence for improving institutional quality to attract FDI.
This study aims to investigate the association between institutional quality and FDI inflows, using panel data from 42 G20 countries from 2005 to 2020, thus contributing to three aspects.First, this study explores the possible mediators taking effect in the association between institutional quality and FDI inflows, which is beneficial for a comprehensive understanding of the various pathways of this process.However, no previous study, to our best knowledge, has focused on this question.Second, this study also involves heterogeneous analyses to investigate whether associations between institutional quality and FDI vary in different groups based on mediators such as trade openness, tax level, and natural resource abundance.This analysis will allow policymakers to formulate policies appropriate for different groups, which provided more practical implications.Finally, this study takes G20 countries as the sample, which has rich practical significance, i.e., G20 countries' total GDP accounts for more than 90% of the world and attracts about 60% of FDI.It is one of the largest cooperative organizations around the world.Taking G20 countries as a sample to discuss FDI-related issues has significant implications; however, the existing research ignores these issues.

Literature on institutional quality
Studies on institutional quality can be traced back to the emergence and development of institutional economics.Prior studies have primarily focused on institutional quality's effects on economic and trade growth, environmentally sustainable development, and stock market performance.
First, neo-institutional economics indicates that sustainable economic and trade growth is inseparable from a sound institutional arrangement (Maruta et al., 2020).Under different institutional quality, even the same factors of production will achieve completely different economic growth effects, because a high institutional quality itself can constitute a country's comparative advantage (Saad, 2021).Extending Ricardo's comparative advantage model by introducing institutional differences into the framework of incomplete contract theory analysis, reveals that institutional quality, such as intellectual property protection and contract enforcement, is an important source of a country's comparative advantage (Hea-Jung, 2018).The lower a country's institutional quality, for example, the lower its achievable production efficiency, which hinders sustainable economic growth (Buterin et al., 2017).Besides, heterogeneity analyses reveal that, although the effect of institutional quality on economic growth is long-term and continuous, the institutional role must meet its supporting conditions.That is, the effect of institutional quality on countries with different economic development stages is various.Compared with countries with slow economic growth, the promotion role of institutional quality is more significant in countries with rapid economic development (Nawaz, 2015).
Second, institutional quality is beneficial to environmentally sustainable development.The improvement of institutional quality inhibits carbon emissions, which is conducive to environmentally sustainable development (Acheampong et al., 2021).This effect mainly occurs through three channels: technological innovation, resource allocation, and industrial structure.The technological innovation channel refers to the higher institutional quality, which provides a guarantee for the protection of domestic novel low-carbon technologies, which is further conducive for high-tech enterprises to increase research on green technologies (Genin et al., 2021).Therefore, higher institutional quality has a positive impact on domestic renewable energy technology innovation, which reduces carbon emissions and is beneficial to environmentally sustainable development (Zhao et al., 2017).
Similarly, the resource allocation channel refers to the higher institutional quality promoting the efficient allocation of domestic resources; then, carbon emissions will be significantly reduced by providing financial support to high-tech industries (Qiu & Chen, 2020).The industrial structure channel refers to the improvement of institutional quality contributing to the transformation and upgrading of the manufacturing industry, which leads to industrial structure adjustment and is an effective measure to reduce carbon emissions (Acheampong et al., 2021).However, previous studies revealed a certain time-lag in this process.The emissions reduction effect of institutional quality generally occurs in three to five years (Goel et al., 2013).Finally, based on the perspective of heterogeneity, existing studies also indicated that institutional quality does not always reduce carbon emissions; further, there also may be a threshold effect (Ran et al., 2020).
Third, concerning the institutional quality's effects on stock market performance, previous studies indicated that higher institutional quality can not only improve the average value of the stock market but also reduce stock price volatility (Tang et al., 2020).A favourable institution has an important impact on corporate governance, corporate value evaluation, and market development.It is found that higher institutional quality reduces the transaction cost of enterprise operation, improves enterprises' growth prospects and profit, and therefore increases the return to shareholders (Hearn et al., 2017).In addition, higher institutional quality also improves the demand for stocks and then improves the value of the whole stock market (Ye et al., 2019).
However, previous studies also revealed a negative association.This may be because the perfect institution reduces arbitrage opportunities in the stock market, thus preventing speculators from entering the market (Clausen, 2014).Finally, perfect institutional quality is also conducive to reducing stock price volatility.Favourable institutions can reduce the information asymmetry between enterprises and investors.In a good institutional environment, the possibility of management concealing negative news is less (Ng et al., 2016).Therefore, a good institutional environment is beneficial for reducing systemic risk and equity risk premium, therefore smoothing stock price volatility.

Literature on foreign direct investment
Previous studies primarily focused on two aspects of FDI, i.e., the determinants of FDI and the relationship between FDI and economic growth.FDI is determined by four categories of factors: institutional, economic, geographic, and supporting.Institutional factors refer to institutional quality, institutional environment, and the institutional difference between the host and home countries.Specifically, the factors include the degree of political risk, the degree of corruption, intellectual property protection, and institutional distance (Shah et al., 2016).Economic factors refer to market size, economic growth, fiscal stance, exchange rate, and trade openness (Baharumshah et al., 2019).Geographic factors mainly refer to geographic proximity between the host and home countries, while various types of infrastructure, such as logistic and indigenous investment, constitute supporting determinants of FDI (Shah et al., 2020).
On the economic effects of FDI, existing literature has not yet reached a consensus.Some studies indicated that this relationship appears to be positive, and the association becomes more significant when the host country adopts liberalized trade institutions (Bird & Choi, 2020).However, existing studies also found that these effects of FDI on economic growth are not robust.When a country's economic resource allocation gap is large, the influx of FDI will have a 'crowding out' effect in some regions.Under this circumstance, vicious competition for capital will result in slow economic growth (Kai & Dan, 2009).

Literature on the relationship between institutional quality and foreign direct investment
Existing literature has focused on the relationship between different aspects of institutional quality (e.g., corruption, government efficiency, regulatory quality) and FDI.First, there is a significant inverted U-shaped association between corruption and FDI, indicating that a certain degree of corruption actually attracts FDI inflows (Barassi & Ying, 2012).This is because corruption helps to speed up bureaucratic procedures, thus providing an implicit subsidy for firms.Therefore, moderate corruption motivates firms to seek opportunities for FDI (Okafor et al., 2015).Second, government efficiency refers to the quality of public services provided by the government and the degree of independence from interest groups, which is positively correlated with FDI (Chungshik, 2015).On the one hand, high government efficiency guarantees that the host country can provide comprehensive and effective public services to support the development of foreign enterprises.
On the other hand, an efficient government means that foreign capital faces fewer restrictions and political pressures in the host country; furthermore, the investment return is more sustainable (Peres et al., 2018).Therefore, high government efficiency promotes FDI inflows.Finally, high regulatory quality maintains high transparency of accounting information, provides good protection for shareholders, and reduces information asymmetry, thus attracting FDI inflows (Contractor et al., 2020).

Literature gaps
Although previous studies made efforts to determine the issues on FDI, limitations remain.First, existing studies focus on a certain aspect of institutional quality and lack research on the overall indicators of institutional quality.Second, the literature seldom comprehensively analyzes the mediators taking effect in the relationship between institutional quality and FDI, which fails to explore this process in depth.Finally, the literature also seldom focuses on the heterogeneity analyses for this relationship.Further exploring moderators in this relationship will create richer practical implications; however, this tends to be ignored by existing studies.

Theoretical analyses and hypotheses
According to the discussions above, institutional quality is critical for attracting FDI.To sum up, on the one hand, the optimization of the host countries' institutional quality indicates that the preferential policies for foreign investment are stronger.The host country attracts foreign investment and increases the scale of foreign investment projects through the improvement of related policies, such as taxation, subsidies, and export tax rebates (Uddin et al., 2019).On the other hand, favourable institutional quality has stronger protection of technology intellectual property rights and foreign capital achievements, which reduces the operating costs of foreign-funded enterprises (Mathew & Mukherjee, 2014).Under the double guarantee of foreign investment policy and technological protection, foreign capital tends to enter the host country with high institutional quality.Thus, this study puts forward the following hypothesis: Hypothesis 1 (H1).The relationship between institutional quality and FDI appears to be positive.
Possible mediators involve three aspects, i.e., trade openness, industrial structure, and technological innovation.The first mediator indicates that high institutional quality promotes trade openness of host countries and therefore attracts more FDI.High institutional quality drives the improvement of trade openness.As one of the sources of comparative advantage, high institutional quality reduces the production cost of domestic enterprises, thereby encouraging them to expand the production scale (Saad, 2021).Therefore, high institutional quality stimulates domestic exports.Besides, institutional quality includes the trade freedom index, which shows that high institutional quality guarantees fewer restrictions on domestic import trade (Faber & Gerritse, 2012).Therefore, high institutional quality stimulates domestic imports.Existing studies typically define trade openness as the proportion of total imports and exports to GDP (Zhang et al., 2021).Therefore, the degree of trade openness is higher in countries with higher institutional quality.
Trade openness attracts FDI through two pathways.On the one hand, a higher degree of trade openness promotes the international flow of production factors, which is conducive to the formation of a specialized division of labour (Moritz, 2015).From the perspective of foreign investors, a specialized division of labour improves production efficiency and reduces costs, which means a high return rate of investment (Kim et al., 2013).Therefore, high institutional quality is beneficial to attract FDI.On the other hand, the improvement of trade openness promotes the introduction and accumulation of foreign knowledge capital (Brem et al., 2017).The massive increase of knowledge capital promotes enterprises' capabilities to develop novel products, which provides technical conditions for attracting FDI (Campi & Duenas, 2019).Furthermore, knowledge capital also improves labour productivity based on understanding new technologies, which provides an impetus for FDI.Thus, this study establishes the following hypothesis: Hypothesis 2 (H2).Institutional quality promotes trade openness and therefore attracts FDI.
The second mediator indicates that high institutional quality optimizes industrial structure and therefore attracts more FDI.Favourable institutions motivate enterprises to actively pursue industrial structure upgrades (Keller & Shiue, 2020).High institutional quality, such as strong supporting and guiding regulations, leads endowments to flow in the direction of promoting industrial upgrading.Proper economic and financial institutions promote the flow and optimal allocation of factors of production and thus change the position of different industries in the total output.Specifically, through a certain institutional design, high institutional quality quickly and efficiently guides resources to flow from low value-added industries to high value-added and key industries and then helps to realize industrial structure upgrading (Wu et al., 2015).
The advanced industrial structure means that the tertiary industry or service industry is more active (Liu et al., 2020).Based on the New Economic Geography (NEG) theory, the agglomeration of the service industry generates economies of scale through enhancing links between upstream-and downstream-related enterprises.With the continuous improvement of market requirements for service specialization, manufacturing enterprises have gradually outsourced intermediate service links to more specialized producer service enterprises (Spencer, 2012).Therefore, the active tertiary industry helps to form the distribution of the producer service industry around the manufacturing industry, which greatly expands the market size.Marketseeking FDI refers to the use of the host country's market resources to increase the sales volume and income of products (He et al., 2015).Increasing tertiary industry is conducive to exerting the scale effect of the market, thereby attracting market-seeking FDI.Thus, this study proposes the following hypothesis: Hypothesis 3 (H3).Institutional quality drives industrial structure optimization and therefore attracts FDI.
The third mediator indicates that high institutional quality encourages technological innovation and therefore attracts more FDI.A sound institution system stimulates enterprises' substantial innovation.Favourable institutions bring environments of safety, convenience, and light burden to technological innovation-based enterprises, which are helpful to set the correct innovation motivation (Baldwin et al., 2014).Therefore, high institutional quality provides a steady stream of power for technological innovation.
Technological innovation is characterized by exclusivity.Once innovative enterprises succeed, they will obtain returns far greater than those of other industries (Etro, 2019).Considering the profit-seeking nature of capital, technological innovation is conducive to attracting foreign investment.Thus, this study proposes the following hypothesis: Hypothesis 4 (H4).Institutional quality encourages technological innovation and therefore attracts FDI.
Factors such as financial development, tax level, and natural resources abundance may also moderate the positive relationship between institutional quality and FDI.First, the development and deepening of the financial market improve the host country's capital allocation efficiency (Shahbaz et al., 2022).Therefore, financial development cooperates with a sound institutional system to effectively identify investment opportunities and allocate resources reasonably, provides good financial support for foreign-funded enterprises, and reduces financing costs and investment risks, which eventually strengthen the effect of institutional quality on attracting FDI (Silva et al., 2021).
Second, the tax burden negatively moderates the relationship between institutional quality and FDI.If the tax rate of the host country is high, the cost of foreign investment will increase, which reduces investment profits (Jones & Temouri, 2016).Therefore, a tax level may weaken the effect of institutional quality in attracting FDI.
Third, natural resource abundance is an important factor of production for the host country, and FDI exists in the form of 'international cooperation of factors of production' (Amiri et al., 2019).FDI brings factors such as advanced technology and management experience from the home country to the host country.When the host country has abundant natural resources, advanced production factors can promote the utilization of idle resources more efficiently in the host country, thereby attracting more FDI (Hajzler, 2014).Therefore, the positive relationship between institutional quality and FDI is more significant in countries with higher natural resource abundance.Thus, this study proposes the following hypothesis: Hypothesis 5 (H5).The relationship between institutional quality and FDI is moderated by financial development, tax level, and natural resource abundance.Among them, financial development and natural resource abundance strengthen the role of institutional quality in attracting FDI; the tax level weakens this process.

Data
The sample used in this study comes from 42 1 countries in the Group of Twenty (G20), which was established in 1999 and includes industrialized and emerging market countries (see Table 1).The G20 aims to conduct constructive dialogues on important issues such as the international economy, promote the reform of the international financial system, and eventually promote the sustainable growth of the world economy.G20 countries include the most important developed and developing countries in the world; therefore, the conclusions drawn from this sample have rich significance (Paramati et al., 2017).The dataset employed by this study comprises balanced panel data of G20 countries from 2005 to 2020 and includes 672 observations.

Model
To investigate the association between institutional quality and FDI inflows, this study specifies the empirical model as follows: Here, the subscript i represents the country, t denotes the year, and k stands for the number of control variables.CV j is the control variable j.

Variables
To quantify the dependent variable, i.e., institutional quality, this study follows the usual practice and employs the sum of 10 indicators, namely, commercial freedom, trade freedom, fiscal freedom, government expenditure, currency freedom, investment freedom, financial freedom, property rights, trade-off index, and labour freedom index (Chen et al., 2019).The independent variable, FDI inflows, is collected directly from World Bank Database.
Besides, to alleviate omitted variable bias, this study also incorporates 10 control variables (Kang et al., 2018).They are per capita GDP, researchers in R&D, patent application volume, individuals using the Internet (% of the total population), urban population (% of the total population), consumer price index, official exchange rate, real interest rate, employment-to-population ratio, and labour tax and contributions (% of commercial profits).Furthermore, this study investigates three mediators corresponding to H2 to H4, namely, trade openness (measured by total imports and exports [% of GDP]), industrial structure (measured by tertiary industry added value [% of GDP]), and technological innovation (measured by high-technology exports [% of manufactured exports]).In addition, based on H5, this study verifies the moderator of financial development (measured by domestic credit provided by the financial sector [% of GDP]), tax level (measured by tax revenue [% of GDP]), and natural resources abundance (measured by total natural resource rents [% of GDP]).Specifications of variables are summarized in Table 2.

Empirical strategies
For benchmark analyses, this study uses a fixed-effect model to analyze the relationship between institutional quality and FDI, namely, Equation (1).Then, to alleviate endogeneity problems, it uses the Generalized Method of Moments (GMM) estimation.Furthermore, to explore the potential mediators in this process, the three steps suggested by Baron and Kenny (1986) are followed.Finally, it introduces interaction terms based on financial development, tax level, and natural resource abundance to examine whether the association between institutional quality and FDI varies in different groups.

Descriptive statistics
From Table 3, the maximum value of FDI inflows (% of GDP) is 280.1318, in Cyprus, and the minimum is À0.0521, in Japan.The mean value of FDI inflows (% of GDP) is 7.0300; the standard error is 22.6860, which indicates a wide variation of the data.Similarly, the maximum value of institutional quality is 83.1000 in Australia, the minimum is 43.8000 in Argentina.The mean value of institutional quality is 67.1144; the standard error is as high as 8.4074, which indicates that the degree of institutional quality in the 42 sampled countries is quite uneven.Thus, the sample used in this study is considered representative.

Panel unit root and cointegration test
This study utilizes the short panel data from 42 G20 countries from 2005 to 2020.Although this dataset is a short panel, it still covers 16 years.To avoid estimation bias caused by non-stationarity, this study conducts unit root tests.From Table 4, the first-order difference terms of most series are stationary; thus, the variables in this study follow the I (1) process.
Moreover, this study uses the Kao test to examine whether a cointegration relationship among the variables exists.Results show that the Dickey-Fuller t-statistic is À8.3232 and the p-value is 0.0000.The augmented Dickey-Fuller t-statistic is À2.7840, while the p-value is 0.0027.Thus, the hypothesis of no cointegration is significantly rejected.Therefore, this study may further explore the association between institutional quality and FDI.

Benchmark empirical results
Table 5 presents the results of benchmark estimations.Column (1) excludes all control variables, only including the key independent variable, i.e., institutional quality.Column (2) includes all the control variables.Results show that the coefficient of insqua is significantly positive, indicating the relationship between institutional quality and FDI appears to be positive.This finding supports H1.Besides, the coefficients of the control variables are mainly in line with expectations and previous studies.For instance, per capita GDP, patent application volume, urban population ratio, official exchange rate, and real interest rate all make contribute to attracting FDI (Boateng et al., 2015;Belkhodja et al., 2017).

Endogeneity
The above benchmark estimations may suffer from endogeneity problems.One reason for this is that FDI may also affect institutional quality, which suggests a reverse causality.Additionally, although this study controls for 10 variables, it may still have omitted variables that affect credit cards.Therefore, this study employs GMM estimation to correct potential bias caused by endogeneity.This study introduces the first-order lag term of FDI and performs a GMM estimation (Wintoki et al., 2012).The Arellano-Bond test shows that the statistic is 0.9700, with a p-value of 0.3340, which implies that the model in this study can be estimated using the GMM method.In addition, the Sargan test shows that Chi 2 (548) ¼ 492.1400, with a p-value of 0.9580, which means that the instrumental variables selected in this study are appropriate.The result indicates that H1 still holds [see Column (3), Table 5].

Robustness check
To verify the robustness of the above findings, this study conducts two robustness checks.First, this study excludes the observations with outliers for the dependent variable, i.e., FDI inflows.Specifically, this study excludes observations whose FDI L.variable means the first-order lag term of the variable.Column (3) is GMM estimation, so R 2 is not reported.Source: arranged by the authors.
is higher than the 95th quantile or less than the 5th quantile.Then, this study reestimates Equation (1); see Column (1), Table 6.Second, it divides the whole sample into two subsamples in terms of the mean value of per capita GDP.In the two subsamples, this study re-estimates the equation; see Columns (2) and (3), Table 6.All results from the robustness checks remain unchanged in Table 6.Therefore, the relationship between institutional quality and FDI does indeed appear to be positive.

Mediating analyses
To test H2, H3, and H4, this study used a procedure put forward by Baron and Kenny (1986) to examine three mediators, i.e., trade openness, industrial structure, and technological innovation.To empirically test whether the three mediators hold, this study constructs the following three equations: In Equations ( 2) to (4), Y represents the dependent variable (FDI), X represents the independent variable (institutional quality), and M represents the three mediators to be tested (i.e., trade openness, industrial structure, and technological innovation).
In Equation ( 2), the coefficient a indicates the association between the independent and dependent variables.In Equation (3), the coefficient b represents the association between the independent and mediator variables.In Equation (4), if d is significant, then the mediating effect holds.Furthermore, if both c and d are significant, the mediating effect is partial, indicating other mediators remain; if c is not significant, the mediating effect is complete, indicating the mediator is unique.The results are presented in Table 7.
Column (1) has been proved above, which suggests the positive association between institutional quality and FDI.For the first mediator, i.e., trade openness, Column (2) suggests that institutional quality is positively associated with trade openness, indicating that favourable institutions promote trade openness.Column (3) shows that institutional quality contributes to trade openness and therefore attracts more FDI.Thus, H2 is supported.For the second mediator, i.e., industrial structure, Column (4) suggests that institutional quality is positively associated with industrial structure optimization.Column (5) shows that institutional quality promotes industrial structure sophistication and therefore increases FDI inflows.This confirms H3.
For the third mediator, i.e., technological innovation, Column (6) suggests that institutional quality is positively associated with technological innovation, indicating that sound institutions help enterprises to achieve technological innovation.Column (7) shows that institutional quality promotes technological innovation and therefore improves FDI inflows.This confirms H4.

Moderating effects
As hypothesized in H5, three moderators (i.e., financial development, tax level, and natural resource abundance) may affect the relationship between institutional quality and FDI.To explore the heterogeneity of this process, this study first generates three dummy variables, (i.e., high_finandev, high_tax, and high_resource) based on the average value of the three moderates, respectively.In detail, high_finandev is equal to 1 for observations with financial development higher than its average value.Otherwise, it is equal to 0. Similarly, high_tax and high_resource represent tax level and natural resource abundance higher than the corresponding average value.Then, this study interacts the three dummy variables with the key independent variable, i.e., institutional quality.If these interaction terms are significant, the moderating effects are set up.
Results in Table 8 show that the three interaction terms are all significant.Moreover, the coefficients of insquaÂfinanc_dev and insquaÂresource are positive; the coefficient of insquaÂtax is negative.This indicates that financial development and natural resource abundance strengthen the promoting role of institutional quality in attracting FDI, and the tax level weakens this process.Thus, H5 is supported.

Conclusions and implications
To investigate the relationship between institutional quality and FDI inflows, this study employs panel data from 42 G20 countries from 2005 to 2020.The results indicate that the association between institutional quality and FDI inflows appears to be positive, which indicates that favourable institutions are beneficial to attracting FDI inflows.Mediating analyses reveal that institutional quality increases FDI inflows by improving trade openness, promoting industrial structure optimization, and conducting technological innovation.Furthermore, the positive association between institutional quality and FDI inflows is moderated by financial development, tax level, and natural resource abundance.Among them, financial development and natural resource abundance strengthen the role of institutional quality in promoting FDI inflows, and the tax level weakens this process.
The limitations of this study should be acknowledged.The first is that this study only considers FDI inflows but doesn't consider FDI outflows.Institution-related factors also affect FDI outflows through various channels.Therefore, further studies may further investigate the impact of institutional quality on FDI inflows and outflows.The second is that although the G20 countries show the characteristics of 'high institutional quality, high FDI' and this relationship is supported by this study, other economic integration organizations also experience a similar phenomenon.This study only takes G20 countries as an example.Further research may use data from other samples to verify the findings of this study.The third is that the three mediators explored by this study are all partial mediators, which indicates that there are still other mediators in the relationship between institutional quality and FDI inflows.Accordingly, future studies may also consider other potential mediators to enrich the literature in related fields.This study's findings reveal three implications.The first is to improve institutional quality.From the empirical results, institutional quality has a positive effect on FDI inflows.That is, institutional quality is beneficial to attracting FDI.Therefore, it is necessary to optimize institutional design and improve institutional quality around the world.Specifically, countries should effectively reduce various trade barriers, improve commercial and trade freedom, strengthen intellectual property protection for high-tech products, introduce specific measures to protect the interests of foreign investors, and eventually promote the improvement of institutional quality from multiple perspectives.Second, policymakers should promote financial development by encouraging domestic credit provided by the financial sector.Moderating effect analyses reveal that this variable is a positive mediator in the relationship between institutional quality and FDI, which indicates that domestic credit provided by the financial sector strengthens the promoting effect of institutional quality on attracting FDI inflows.Specific policies such as implementing the due diligence exemption system, encouraging innovation in financial technology services, and improving the convenience of credit business applications are conducive to improving the domestic credit level of the financial sector, which in turn helps institutional quality to further improve the role of attracting FDI.
Finally, policymakers are supposed to properly reduce the tax level.Moderating effect analyses also show tax level weakens the promoting effect of institutional quality.The tax level constitutes the cost of foreign direct investment and weakens the motivation of foreign investment, which is not conducive to the sustainable development of FDI.Therefore, releasing the tax burden on foreign investment enterprises is beneficial to FDI inflows.Recently, there has been room for reducing taxes and fees in countries around the world.Therefore, policymakers should actively participate in international tax competition, continue to deepen the reform of the tax system, reduce various tax rates appropriately, and improve the competitiveness of the tax system in the context of international tax competition.

Table 2 .
Specifications of variables.

Table 4 .
Unit root test.denote the significance level of 1%, 5% and 10%, respectively.All of the tests add individual fixed effects and linear time trends.The null hypotheses of the five methods are that panels contain unit roots.D.variable means the first-order difference term of the variable.Source: arranged by the authors. Ã

Table 5 .
Benchmark empirical results and the correction of endogeneity.