Semi-endogenous growth in a non-Walrasian DSEM for Brazil: estimation and simulation of changes in foreign income, human capital, R&D, and terms of trade

In an empirical, dynamic simultaneous equation model (DSEM) for Brazil with 22 equations and variables, we show that foreign income is a driver of economic growth besides semi-endogenous technical change. With a balance-of-payments constraint and endogenous terms of trade, the major mechanism is (i) world GDP driving exports, (ii) exports paying for imported capital goods, which (iii) enter a production function increasing output and the foreign-debt/GDP ratio and (iv) increase the endogenous labour force, and (v) slightly reduce human capital growth. The savings gap drives foreign debt and interest rates up and make the model unstable. Permanent increases of human capital increase the R&D/GDP ratio, labour-augmenting productivity, and GDP. A policy to increase the R&D/GDP ratio leads to more human capital, labour productivity and GDP levels. Both knowledge policies reduce the debt/GDP ratio. A lasting shock on the terms of trade reveals that there is no Harberger–Laursen–Metzler effect. The results hold in the presence of endogenous terms of trade, foreign debt, net foreign income, and net current transfers from abroad, and non-Walrasian (dis-)equilibrium variables: inflation and changing inventories for the goods market, and unemployment in the labour market. Policy should strengthen the weak link from R&D (research and development) to technical change and make education more attractive.


Introduction
Growth accounting found a strong role for the productivity residual first in Cobb-Douglas functions (Tinbergen 1942;Solow 1957, Fagerberg 1994) and recently in more general CES functions (Ziesemer 2022a). Therefore, the neoclassical growth model of Solow (1956) has taken over the role of the leading growth model from Harrod-Domar, and technical change is seen as the leading driver of closed-economy growth. A second class of growth models considers world income growth as another driving force of growth. First, the World Bank's two-gap version of the Harrod-Domar model, based on Johnson (1953) and linear programming models (Basu 1984), and further developed during the 1960s, includes export growth (Feder 1981). Second, Bardhan and Lewis (1970) turned the two-gap model into a neoclassical version by way of assuming that there is a domestic and a foreign capital stock; the investment of the latter is imported and paid for by exports. Both models have the assumption of exports depending on the terms of trade and an exogenous export growth rate. Ziesemer (1995a) assumes that their exogenous export growth rate is the product of that of world income growth and an income elasticity, as Thirlwall (1983) did, and links the model to the literature on the ideas of Prebisch (1950Prebisch ( , 1959 and Singer (1999). Third, Thirlwall (1979Thirlwall ( 1983 suggested balance-ofpayments-constrained (BoPC) growth: If exports depend on world income and the terms-of-trade, and imports on domestic income and terms of trade, the equality of exports and imports on trade balance or their growth rates under constant terms of trade would imply domestic growth depending on foreign growth. 1 All these models have versions with international capital movements (see Feder 1981;Ziesemer 1995bZiesemer , 1998Thirlwall 2011).
There are strongly different ways to model the supply side and the terms of trade in the above-mentioned literature. In the papers of the Harrod-Domar models with absent or fixed prices, the GDP growth rate consists of given parameters, mostly the savings ratio multiplied by the output-capital ratio. Export growth then affects only debt accumulation, the interest burden and the GNI (gross national income). The Bardhan-Lewis model has a neoclassical production function, in which technical change has been separated from efficient labour in the later literature (Ziesemer 1995a, b). Terms of trade are driven by domestic supply and world income in the export function; all arguments are therefore ultimately driven by both foreign income and exogenous technical change, allowing the terms of trade to go either up or down or stay constant depending on the relative strength of these two forces. The missing link between productivity and constrained trade (Krugman 1989) is the effect of productivity increases on terms of trade reductions allowing for more exports and imported capital goods (Ziesemer 1995b). In the BoPC literature, terms 1 3 Economic Change and Restructuring (2023) 56:1147-1183 of trade are exogenous and constant, and production, labour, investment, and savings are often ignored altogether (Ziesemer 2022b).
Models differ in the way output reacts to foreign growth. The BoPC models are Keynesian in spirit and output is supposed to react with additional employment, although the latter never appears explicitly in the models. In extensions of Bardhan and Lewis (1970) with vertical or horizontal labour supply, output and employment react through additional capital goods imports (Ziesemer (1995a). The question is whether employment reacts or only imported capital goods when foreign output increases. The evidence related to Thirlwall's law allows for both, because the evidence is derived without link to the factor markets. In order to allow for both, we use Okun's law, which allows for unemployment and has equilibrium unemployment as a special case, and we add an endogenous labour force function. We start the set-up of our model from exports, imports, and all balance of payments items. Then we add the goods market items investment, and savings, and the supply side with a production function and endogenous human capital, R&D, and technical change.
There is much empirical evidence supporting the impact of world income growth on domestic income growth or the impact of exports on growth in the single-equation regression mode. For the early approaches, we refer to the well-structured survey in Dutt (2002;p. 372-374). For example, Perraton (2003) uses error-correction methods in the single equation form, but not the vector form leading to simultaneous equation systems. Alonso and Garcimartín (1998) use the vector-error-correction method to estimate the export and import functions and estimate other systems to get parameter estimates, but they do not use the power of estimation-based simulations to test the effects of world income growth and the growth reduction from the BoPC. 2 Jayme (2003) provides a VECM and analysed shocks from exports on GDP but does not include the import and export functions or other variables. Conversely, Spinola (2020b) estimates a vector-error-correction model and uses it for simulations but does not show the economic relations of BoPC models in the cointegrating equations. López and Cruz (2000), Holland et al. (2004), Britto and McCombie (2009), Garcimartín et al. (2016), Lélis et al. (2018), Spinola (2020b), and Birkan (2022) also analyse the related data in terms of VAR (vector-autoregressive) and VEC (vectorerror-correction) models. These types of econometric models provide in principle a reliable data analysis for a small set of variables. 3 However, the way they are handled show several shortcomings.
First, some authors have separate VAR or VEC models for import and export functions although they share the terms of trade variables and therefore should be dealt with together because this goes against the lessons of cross-unit cointegration which holds across countries and across equations (Gonzalo and Granger 1995;Banerjee et al. 2004) and mean that sets of cointegrated variables should not be 1 3 analysed separately. This may require that the size of models goes beyond the standard of two to eight variables and equations (see Kilian and Lütkepohl 2017).
Second, they often do not use the model for simulations but only for the purpose of getting the long-term relations.
Third, their disadvantage in principle is that the more detailed mechanisms of the causality chain from world income to domestic GDP via factor and goods markets remains often unclear when only a slightly extended trade balance model is used. 4 Kennedy and Thirlwall (1979) and McCombie (1985) use only the goods market equation with exogenous exports or terms of trade and neglect of debt dynamics and interest payments. Palley (2003) suggests that capacity utilization adjusts imports or productivity growth to balance supply and demand growth. This leads to supply growth determining long-run growth via Verdoorn's law. World GDP growth only affects capacity utilization when imports adjust, or productivity growth adjusts to world GDP growth. There is no link to labour markets and no goods market equilibrium condition. In Dávila-Fernández et al. (2018), there is a long-term ratio I/Y = i* and deviations are assumed to be a function of capacity utilization. Assuming Y = AK as from a limitational production function, 5 and I ≡K + K = i * Y , they get K = i * AK − K as weakly exogenous capital accumulation process. The limitational production function then determines the output level. Investment is linked to the trade variables through an assumption regarding the adjustment of capacity utilization. The paper starts with Thirlwall's law in growth rates, but it has no goods or factor market equilibrium. Dávila-Fernández and Sordi (2019a) is the first paper since Kennedy and Thirlwall (1979) and McCombie (1985) that links the BoPC idea to a goods market equilibrium condition in a theoretical model. They impose that in the long run there is current-account equilibrium and therefore (i) there is no debt accumulation in the long run (and ignored in the short run), (ii) Thirlwall's law rules, and (iii) capital goods are not imported. We deviate in regard to these latter assumptions allowing for debt dynamics and imported capital goods, and in having an empirical model where all equations are estimated. We still allow for Thirlwall's law to work. Razmi (2016) emphasizes the need for a dynamic simultaneous equation model (DSEM). The specific causal mechanism of imported capital goods and other factors of production also using the variables of BoPC models has been shown for an estimated reduced form of the Bardhan/Lewis model with imported capital goods by Mutz and Ziesemer (2008) for Brazil, by Habiyaremye and Ziesemer (2012) for Malaysia, by Ziesemer (2018) in a DSEM analysis for Croatia, and by Hallonsten and Ziesemer (2019) for Trinidad and Tobago, using simultaneous equation estimation, baseline simulation and shock analysis. In all cases we clearly see the effects of world income changes as expected in a Prebisch-Thirlwall perspective, increases in terms of trade and GDP.
As mechanisms in theoretical or empirical work, one either needs the constraint of BoPC models or, alternatively, imported capital goods suggested by Prebisch (1950) and included in the World Bank model. The heterodox model of Dutt (2002) and the neoclassical models based on Bardhan-Lewis (1970) have both, the BoP constraint without or with debt, and imported capital goods. When foreign debt is included, these models do not have a trade-balance constraint, or only a soft one with equal growth rates of exports and imports (Blecker 2021b). However, allowing for foreign debt does mean mainly that debt is used to pay for machines in the short run and that exports are used to pay debt service. In that sense, the balance of payments remains a constraint with debt allowing to postpone payment through exports (Ziesemer 1995b(Ziesemer , 1998.
Our approach for Brazil does not impose balanced trade or current account or growth rate equality for exports and imports, 6 but a balance-of-payments identity including trade, net foreign debt flows, and interest payments on debt stocks, other net factor income and transfers from abroad, and puts emphasis on the impact of foreign debt on domestic interest rates. For all but one of these equations we formulate and estimate dynamic regression equations. In regard to trade, we use data on imported capital goods and distinguish them from domestic investment and imported consumption.
On the supply side we specify and estimate equations making technical change dependent on R&D, and R&D and human capital dependent on each other and on technical change, leading to semi-endogenous growth according to our estimates and simulations.
Changes of inventories are an important disequilibrium variable for the goods market besides unemployment for the labour market. Inventory changes as part of ex-post investment feed back into deposit rate determination, foreign debt accumulation and net secondary income from abroad, and unemployment feeds back into equations for (precautionary) savings and inflation. We estimate equations for all these variables without imposing perfect competition, constant terms of trade or other steady-state assumptions.
In Sect. 2 we explain the data choice for all variables. In Sect. 3 we briefly introduce the main aspects of econometric thinking in a non-technical manner. In Sect. 4 we present the model with 22 variables and equations in estimated form and interpret the results in detail, especially the weaknesses in education and R&D policies. In Sect. 5 we discuss the baseline simulation and show that the Brazilian economy has a long-run instability caused by its savings gap, which leads to increasing foreign debt, relative to GDP, driving up the interest rate. In Sect. 6 we show the effects from simulations of permanent intercept changes of equations for world GDP, human capital, R&D, and terms of trade; we confirm Thirlwall's law and discuss the relation with the literature on (i) BoPC growth, (ii) growth with imported capital goods, and (iii) the reaction of unemployment, labour force, and human capital. In Sect. 7 we summarize all major results as the basis of policy conclusions.

Data and definition of variables
The data for the variables mentioned above are taken from World Development Indicators (WDI) unless other sources are stated. Variables related to the current account and Thirlwall's law are as follows.
Z is world GDP in constant 2010 US$. Unlike Birkan (2022) we do not use US GDP to proxy for world GDP, because only 12% of Brazil's exports go to the USA.
X is exports of goods and services in constant LCU (Local currency units). In spirit, this is the quantity of exports.
P is terms of trade calculated as 'exports as capacity to import', XP X /P M , divided by exports of goods and services in constant LCU, X, yields p = P X /P M . Net barter terms of trade are not used because they ignore services. REER data are not used because they use manufacturing weights, under-emphasizing agriculture, and services. REER is closely correlated with our terms-of-trade variable though.
M is imports of goods and services in constant local currency units. mach is imported machinery and transport equipment in current 1000$ for the period 1989-2020 from the World Integrated Trade Solution, WITS, (at https:// wits. world bank. org) multiplied by 1000 and the official exchange rate, divided by the GDP deflator from WDI and multiplied by 100.
NPir is net primary income from abroad, real, (formerly net factor income from abroad) in constant LCU; (from current LCU using the GDP deflator).
NSir isnet secondary income from abroad, real, (formerly net current transfers from abroad) in constant local currency units (from current LCU using GDP deflator).
NLir is net labour income from abroad, calculated as net primary income from abroad plus interest paid, rF.
The second group of variables are related to investment, savings, and foreign debt, which relate BoPC growth to the goods market.
GFCFis gross fixed capital formation, excluding changes in inventories, in constant local currency units.
dinv is the change of inventories. S is savings in constant local currency units, from the gross savings/GDP ratio, multiplied by GDP in constant LCU (WDI uses a different deflator for gross (fixed) capital formation in constant LCU, which is available only from 1970 onwards). Gross savings are calculated as gross national income less total consumption, plus net transfers.
dr is the deposit rate, not deflated, obtained by saving households. defl is the GDP deflator. r is real interest rate (lending rate deflated by GDP deflator), available only from 1997 to 2019.
F is net foreign debt calculated as accumulated gross investment minus gross savings all in constant local currency units, using net foreign assets from abroad as initial value.
Variables related to production of GDP and knowledge are the following. Y is domestic GDP in constant local currency units. K d is a capital stock calculated by the perpetual inventory method from GFCFmach defined above using a depreciation rate of 4.2547 percent, the average from PWT 9 for the period 1989-2017, and, to make initial capital stocks, an initial growth rate of 0.047 taken from Ziesemer (2022a).
K f is a capital stock calculated by perpetual inventory method from mach (imported machinery and transport equipment) with the same initial growth rate and depreciation rate as for K d .
H is a human capital index from PWT9.1 defined to be between one and five. L is the labour force. U is the unemployment rate. Gaps in the data are filled by estimating and forecasting Okun's law in Eq. (19) below and using the forecasted values to fill the gaps in the data.
Th099 is the labour augmenting technology level calculated for an elasticity of substitution of 0.99 in Ziesemer (2022a) with human capital in the production function.
rdy is R&D expenditure as a share of GDP, which generates technical change.

Econometric aspects
We specify the economic ideas in terms of the literature starting with trade variables, in particular imported capital goods. Then we specify equations also for all explanatory variables that we use. By implication, unlike the early generations of DSEM models (see Kilian andLütkepohl 2017 andFair 2018), we do not include exogenous variables but rather have an equation for each variable as suggested by the VAR approaches; this allows to run simulations out of sample. We have too many variables for use of VECM or structural VAR models though, which are usable only for less than 10 variables (Pesaran 2015) and in practice limited to models with two to eighth variables (Kilian and Lütkepohl 2017). We always check the effect of statistically significant time trends in the spirit of detrending. 7 We test for the statistical significance of many lags of all variables. They are relevant because of habit persistence, estimated expectations, and adjustment processes (Pesaran 2015), which may be implicit in the data. Lags also buy some insurance against (near) unit roots and contribute to cointegration (Maddala and Kim 1998). 7 Theoretical econometrics deals with simultaneous equation system under the assumption that each variable depends on all other variables (Greene 2003) because of a lack of an obvious alternative. However, in the empirical practice this is not the case, but rather only variables supported by empirical literature are used. In our case, we do not make all 22 variables dependent on all 22 more or less lagged variables. The practical default is to justify what is included and not to justify tenths or even hundreds of exclusions which happen to occur by lack of reason to include a variable into an equation.
However, it may happen that many lags are significant, and we are left with too little degrees of freedom. Then we combine the economically essential variables with ar(p) processes (autoregressive processes of lag order p), and we test for remaining serial correlation. Adding an ar(p) process Wooldridge 2013). In the results section we report these dynamic models in the We use the Three-Stage-Least-Squares (3SLS) method, which takes into account contemporaneous correlation of the residuals of all equations as the SUR (seemingly unrelated regression) method does, and we use instrumental variables to deal with endogeneity. 8 We drop the year 2020 in order to avoid end-of-sample bias from the COVID crisis.
Contemporaneous regressors and lagged dependent variables (LDV) may be endogenous requiring instruments (the LDV in case of non-negligible serial correlation when trying the lagged dependent as its own instrument); we use lags of endogenous variables. This has several conditions (see Wooldridge 2013): 1. The instrument may not be a significant regressor in the equation where it serves as an instrument (order condition) because otherwise the first-stage regression would be regressing the variable on itself as instrument; using variables lagged once as instruments always ensures that the variable with the highest lag can be an instrument for the contemporaneous regressor, while the other lagged regressors serve as their own instruments. 2. As we use only endogenous variables, the lagged regressor serving as IV must be significant in the equation for its own current variable because IVs must be correlated with the regressor (the rank order condition consists of the first and second condition together). Third, as the lagged regressor serving as IV depends on its lagged residual in its own equation, this residual should not be correlated with the residual of the equation where it serves as instrument, as IVs and regressors should not be correlated; this cannot be tested as IV estimation imposes E(z'u) = 0 with instrument z(u z ) and therefore we simply assume this or that the bias is small (see Nakamura and Nakamura 1998). More generally, correlation of residuals of one equation with lagged residuals of another equation should not bias the estimation much.
Simulation figures shown below are obtained by the Broyden algorithm using 1000 repetitions with random draws of residuals from a normal distribution as we have a too low number of observations for the use of the bootstrap method. Simulations start from initial values made from actual data. Models are solved forward and backward. Simulation with the estimated model requires that the (i) initial values are not too far away from a solution, and (ii) that there is no overflow through partial instabilities, and (iii) that no variable runs into negative values when it appears in log form elsewhere because logs of negative values do not exist. If overflow or negative values happen to appear, we have most probably an instability either because the economy is unstable or through a misspecification, which requires re-specification. In other words, problems with the solution of the model are an additional test for the economy or for misspecification. One possible source of instability are unit roots of single variables or unit eigenvalues of systems. We therefore check that the sum of coefficients of lagged variables is between 1 and -1. Moreover, the simulations can show whether there are increasing amplitudes or exorbitant growth rates, both indicating instability in an intuitive manner. Instability will be explained economically in order to reduce the probability of misspecification.

The model and estimation results
We first explain the empirical model in the form of estimation results in order to avoid unnecessary length through formulating the model twice; p-values appear in parentheses except for identities. The results for baseline simulation and permanent changes 9 of the intercept of the equations for world income, human capital, the R&D/GDP ratio, and terms of trade are explained in Sect. 6.

Exports, imports, investment, and savings
We start with the trade part and end with the knowledge part of the model. World GDP is one of the two driving forces of the model. It is estimated as an autoregressive process in Eq. (1), depending on its own lags and a time trend. Differentiating with respect to time and assuming constant growth rates we get a long-run growth rate of 2.83%. Therefore, the economy could grow also without technical change and human capital growth.
World GDP is the income term in the export demand function (2) with a short run income elasticity of 0.94, almost unity, and a short-run terms of trade elasticity of -0.32. Export price elasticities are low as usual in the literature. Because of the lagged dependent variable, the short run elasticities have to be divided by (1-0.665), making the long-run elasticities three times larger than the short-run elasticities, -0.95 for the terms of trade and 2.8 for world GDP. The export equation can be estimated in levels as the variables are cointegrated as in Birkan (2022). 10 Lau (1997), Eq. (22), for a formalization of permanent changes in VARs and VECMs related to exogenous and endogenous growth theory. As for the Lucas critique we follow the convention to assume that for small changes it does not matter in the sense that the effects on and of changing coefficients are likely to be small (Kilian and Lütkepohl 2017). 10 Dávila-Fernandez and Sordi (2019b) add capital to the export equation turning it into a supply equation. Pugno (1998) adds the level of prices to the growth rate version of (2). We hesitate to add these arguments and stick to the conventional version of the export equation.
Export revenues, pX, can be used to import machinery and consumption goods. The demand for imported machinery, mach, in Eq. (3) depends on the lagged dependent variable, 11 the previous value of the foreign capital stock, the interest rate (as in Fair 2018), the terms of trade as in Dutt (2002), world GDP, the lagged rate of inflation and two autoregressive terms. The long-run price elasticity is 1.2365/1.233, close to unity. 12 The BoPC literature has an equation similar to (3) for intermediates (see Blecker 2021a; Blecker and Ibarra 2013;Ibarra and Blecker 2016). Technology effects do not enter here directly. Productivity effects come in indirectly from the production function (10) below into the supply increasing (or cost decreasing) argument of the terms of trade function (15); if they were included in (3), prices would capture only other aspects of price formation than technology, the major determinant of comparative advantage in trade theory. Average quality aspects go implicitly into the income elasticity and the intercept, and its change into prices and the time trend, which also has a detrending function for all variables (Wooldridge 2013). 13 Technology arguments can be inserted if the whole causality chain from several regressions would be inserted into a single equation regression, but then it would not represent the typical demand function but rather the explanatory variables of prices and income elasticities are included and lead to collinearity and a different interpretation. 14 We keep these arguments in separate equations. The inclusion of world GDP may reflect demand expectations or foreign exchange constraints.
Imported consumption goods are total imports, M, minus imported machinery, MACH. They depend positively on income and terms of trade as usual, but here also on wealth, defined as the sum of domestic and foreign capital minus foreign debt. As the coefficient of the lagged dependent variable is 0.52, the long-run elasticities are about twice as high as the short-run elasticities.
Besides imported machinery we have investment of domestic goods, total gross fixed capital formation minus imported capital goods, in Eq. (5). It depends on the two lags of domestic capital, 15 lagged output 16 and two lags of the interest rate, where the first lag indicates the normal negative effect, and the second lag is an intertemporal substitution effect leading to higher investments when interest was high two periods ago. There is no lagged dependent variable here because capital stocks are included and make them statistically insignificant.
Savings depend on their own lagged value. They have a high, positive income elasticity, react positively to lagged deposit rates, inflation, and unemployment changes, negative to past inflation and wealth. High debt relative to domestic capital increase savings in the sense of a policy reaction function of the government. The lagged residual indicates the dependence on one additional lag for all variables. Short-run elasticities with or without lags have to be multiplied by roughly a factor three to get long-run elasticities. 15 Franke (2022) attributes the idea of negative effects of capital stocks on investment to Harrod and Kaldor and offers supporting evidence. They also appear in the neoclassical investment theory where investment is the difference between target and lagged value of capital. This effect therefore should not be controversial. 16 Literature in the tradition of Keynes and Kalecki often uses capacity utilization (in the investment equation), for which data are pertinently hard to get. Capacity utilization is likely to be strongly correlated with unemployment rates. Output growth above trend is also strongly correlated with unemployment. Therefore, we would read investment functions with GDP as an argument analogous to having capacity utilization. When output is above (below) trend capacity utilization will also be above (below) normal.

Perpetual inventory identities
As investment and savings are explained up to changes in inventories, we can now define their accumulation. For any given value of foreign debt, the difference between investment, the sum of gross fixed capital formation and changes of inventories, and savings (including net factor income and net current transfers from abroad) enhances foreign debt. Alternatively, we could use current account deficits. Data are made in the way indicated by Eq. (7) and therefore re-estimation confirms the unit coefficients and a constant for rounding errors, whereas t-values and p-values are irrelevant.
Imported capital goods, mach, are accumulated to the foreign capital stock, where the lagged dependent variable has a coefficient of unity minus depreciation rate.
Gross fixed capital formation minus imported capital goods builds the stock of domestic capital using the same rate of depreciation by lack of better information. The re-estimate yields

Production function, knowledge accumulation, and labour supply
The capital stocks enter the production function and together with debt they enter the definition of wealth introduced above. 17 A Cobb-Douglas production function seems to be realistic for Brazil according to Ziesemer (2022a,c). Elasticities of production for Brazil in Eq. (10) are near the standard values of 0.3 for domestic physical and human capital, and 0.6-0.7 for labour and technical change. The value for foreign capital is only 0.1. Moreover, we have autoregressive processes of order two and five, where the latter may reflect the business cycle length.
As the human capital variable H is defined in the range of one to five, we transform it to 4/(5-H) in Eq. (11), which is between unity and infinity, to have a variable that is not limited in its value in the simulations. The change of this variable is driven by the rate of change of technology and by the demand for R&D purposes. When growth rates of GDP are larger, people go less for education rather than investing more in education. The unit coefficient reminds us of unit root problems, which are present in the dependent variable according to the ADF test, which has low power, but not according to the DF-GLS test, which has no low-power problem. Taking differences on the left-hand side and dropping the lagged dependent variable from (11) gives almost identical results and makes the instability of the model discussed below appear earlier. Moreover, after all, we could not find a better specification.
The growth of the labour force in Eq. (12) is driven by its own five-year lag, encouraged by human capital growth, and growth of the GDP 18 with the same 2-year lag that discourages human capital formation. This may suggest the need for a policy reform to make education more attractive in Brazil. World income growth also has a positive effect, similar to the employment effects in traditional Keynesian models, but here for the labour force. Finally, there are autoregressive terms with lags four, five and one.
Unlike Fair (2018) for the USA, we do not find a wealth effect or a discouraged worker effect from unemployment for Brazil. Technical change is enhanced by its own one-year lag (after correcting for its subtraction on both side for the estimation) 19 and by current and lagged R&D/GDP growth in Eq. (13) with positive effects from and negative effects from its five-year lag. If R&D/Y goes to a constant value, technical change goes to a slightly negative rate, perhaps through a bias from a low number of observations, or through loss of sectors with productivity growth abroad.

3
R&D is driven by its own lag, by past technical change and by a change in the growth rate of the human capital variable, which is stationary in the form used in (14).
If we assume that R&D goes to a constant share of GDP and technical change to a constant growth rate, (13) and (14) lead to a negative growth rate of technical change, and to R&D/Y = 1.07 in the long run. Improving the link from R&D to technical change is an important policy task for Brazilian business and its government. Reading (13) and (14) together technical change can be interpreted as depending indirectly on endogenous human capital as in the specifications of Lucas (1988Lucas ( , 2015 and Ziesemer (1991).

Terms of trade, Interest, and Inflation
Theoretical and empirical results from models suggest that the terms of trade in (15) are driven by domestic and world GDP (derived from trade variables without imposing balanced trade). They represent supply and demand growth where the latter is reflected by world income in the export demand function, which Prebisch (1950) and Singer (1999), Dutt (2002) and Spinola (2020a), Oreiro (2016) and Blecker (2021b), and Bardhan and Lewis (1970) and Ziesemer (1995aZiesemer ( , b, 1998 have in common. In (15), the sum of coefficients for the world GDP variables is about the same as the coefficient for the lagged domestic GDP. Lags suggest that there are long-term contracts with prices changed only slowly when contracts expire successively. 20 Interest rates have an impact on investment Eqs. (3) and (5) and therefore should be explained as well. They can be seen as a return for banks who have a cost from deposit rates dr, which affect interest rates positively with a lag of three years. Two lags of the interest variable matter in Eq. (16). The foreign debt/GDP ratio increases interest rates in cubic form, which we plot in Fig. 1. Deviations from output trend, which is similar to the output gap variable used by Fair (2018), enhance interest rates. 21 An autoregressive term of order five with roughly a unit coefficient appears again.

3
Economic Change and Restructuring (2023) 56:1147-1183 The deposit rate, log dr, reacts, according to (17), slightly positively to its own lag, to higher current interest and inflation rates as incentives to offer savers more, negatively to lagged interest rates (offering less if banks had higher interest and offered more in the past), and almost not to past inflation rates, which outweigh each other. Capital inflows in the form of investment minus savings decrease the deposit rate. The second lag of interest rates is insignificant but improves the adjusted R-squared and the Durbin-Watson statistic. We attribute the insignificance to collinearity with other lags. Changes from five years ago have a slightly positive effect through an ar(5) process. This equation is similar to the Dewald-Johnson-Taylor rules for discount rates (Fair 2018).
The change of the inflation rate in (18) is reduced by lagged inflation and also by increasing interest rates beyond 27% because of its inverted u-shape form, and by the unemployment rate squared. (18) is a Phillips curve augmented with its own lags and interest policy and four ar(i) terms. All coefficients in (18)

Disequilibrium adjustment and income from abroad
Labour markets may not clear immediately, and we leave it open whether Keynesian or neoclassical assumptions 22 are more realistic. Okun's law as formulated in (19) can capture both cases. The unemployment rate depends on its own lag 23 and on the GDP growth rate and thereby varies over business cycle periods. For a hypothetical long-run growth rate of two or three percent the coefficients imply a long-run unemployment rate of 10.8% or 7.8%. 24 Adding the growth rate of labour supply or of technical change (in the spirit of linking the BoPC growth rate to the natural rate) does not lead to statistically significant results, implying that there is no tension between the actual and the natural rate of growth for Brazil. 25 The change of inventories, dinv, is modeled in Eq. (20). When goods markets do not clear perfectly excess supply must go into inventories and excess demand can be served by reducing inventories (Harrod 1939;Fair 2018). However, this happens in (20) only with coefficient 0.62, indicating together with the lagged dependent variable that this mechanism is also imperfect. To get intuitively plausible coefficients, we take the change of inventories as percentage of the domestic capital stock, which avoids introducing additional volatility when dividing by GDP instead. It depends on its own first lag with coefficient -0.1 and with -0.218 on its own second lag. It is reduced by excess demand. A time trend corrects for (0.01) (0.00) (0.023)  (2000) estimate a special case of this where our coefficient of 0.9 is forced to be unity. 24 Unemployment was related to long-run theory, among others by Pissarides (1990Pissarides ( , 2000, Shapiro and Stiglitz (1984)  trending of all variables and may include technical progress. 26 All variables have an additional effect when lagged by four periods.
In the formulation of excess demand in (20), savings are diminished by net factor income from abroad, −RF + NLIR , for capital and labour services -and by net secondary income (transfers) from abroad, NSIR . Net labour income from abroad depends on growth at home and abroad and its own lags in (21).
Net secondary income from abroad, in (22), is calculated as a residual from the balance of payments identity, which has net labour income from abroad with a unit coefficient and the sum of debt reduction, (−GFCF − DINV + S) , and the interestaugmented trade balance of goods and services, (−PX + M + RF), also with a unit coefficient. 27 This residual determination of secondary income may look like another possibility to escape from the balance of trade constraint. However, in all our simulations below secondary income does not react in an economically or statistically significant way.
The combination of data and the dynamic specification and estimation methods leads to 58 included observations for the period 1962 to 2019. The total system (unbalanced) observations are 622, resulting in an average across the 22 equations of 28 yearly observations. The appendix lists the observations per equation. The chosen method iterates coefficients after estimation of a one-step weighting matrix. Convergence is achieved after finding 1 weight matrix, 23 total coefficient iterations. We present the number of observations, adjusted R 2 , and the Durbin-Watson statistic for serial correlation for the 22 equations in Table 1. From the coefficients of the debt/GDP ratio in (16), using an intuitively chosen part of the constant, we get Fig. 1. The data for the F/Y are in the range from zero to 0.7 (70%). For debt ratios between 45 and 60% the interest rate is constant, but below and beyond this range it increases strongly.

Baseline simulation and instability
We can solve the model for the periods for which all equations have estimated residuals, which is 2004-2019, the later part of the estimation period, and beyond until 2032. Going beyond 2032 the solutions generate more than the standard value of two percent failures. This is probably caused by an instability in the model. The reason for the instability is that investments are mostly larger than savings shown in Fig. 2. This difference accumulates to foreign debt in (7), shown as share of GDP data in Fig. 3. According to Fig. 1 this drives up the interest rate, which drastically brings inflation down and even to negative rates in forward simulations until 2032.
The policy reaction to increases of debt in the savings Eq. (6) when taken relative to domestic capital, 33.3(F −2 ∕KD −2 ) 4 or 0.54(F −2 ∕Y −2 ) 4 , is too weak to avoid the instability. Hopefully, Brazil will strengthen savings policies in the next ten years. 28 The baseline simulation in Figure 9 shows that actual data are above baseline for some data series from 2006 to 2014. For 2006 to 2008 this is a global bubble. Brazil does not suffer much from the financial crisis, except in 2009, and interest rates go down from 2009 to 2013. Then the Brazilian political crisis brings the economy down from 2014/15-2017. 29 The COVID crisis brings the economy down below baseline again in 2020. Data remain in the confidence intervals before 2007. The baseline solution of the model is also obtained backward and built into the graphs of Figure 9 for the period of data availability of each equation.

Discussion of issues of dynamics 30
Are results dependent on the assumption of no steady state? We do not impose assumptions that ensure the existence of a steady state or make it impossible. This is all left to the estimation outcomes. If, for example the products of domestic and world GDP and their coefficients would be equal up to the sign, we could have convergence to constant terms of trade. Moreover, in principle imports, exports, investment, and saving could have the same growth rate as domestic GDP; then the difference between investment and savings would have a constant value relative to GDP, and the debt/GDP and interest rates could also be constant in the long run. 31 But empirically all these possibilities are not supported by the estimates but rather the savings gap and foreign debt grow more quickly than domestic GDP, and the ensuing interest rate increases and prevents the economy from having steady states.
These results go against the widespread believe, that the market will reach an equilibrium in the long-run, and that this ensures that economies are out of trouble. Even with goods and labour market equilibrium the results hold because the process of foreign debt/GDP dynamics is unstable when actually r > g, with interest rate r and GDP growth rate g. 32 Modelers have often imposed the stability assumption r < g although it is often violated. In case of instability creditors will expect more and more that the debt service cannot be paid. If debt service problems are expected, creditors may feel compensated for their risk by short run interest payments and may prefer short-run profit to interest rate reduction (see also Ziesemer 2022b). Typically, these processes are not ended by market equilibrium with stable debt dynamics leading to a constant debt/GDP ratio but rather we get debt crises, currency crises, and banking crises on the global level like the Latin American and African debt crisis 1981-1983, the regional level like the Asian crisis 1998, and the global financial and European government debt crisis 2007-2013, and numerous single country crises leading to moratoria on debt services, reschedulings, and HIPC (highly indebted poor countries) initiatives, often followed by credit rationing.
How important is the autocorrelation problem in the data and how do we adjust for it? Autocorrelation problems in the data are visible through the statistical significance of the lagged dependent variables in all but Eq. (5) for domestic investment, where they are implicit in the capital stock variables. All but one coefficients of lagged dependent variables are below unity. They are not the source of instability, because human capital increases GDP, but rather instability comes from the debt accumulation and perhaps interactions of other dynamic cross-equation effects (like the product of off-diagonal derivations in the determinant of the Jacobian of a 2 × 2 system). Even after introduction of explanatory variables the coefficients of the lagged dependent variables are important. In most preliminary estimates of equations there is serial correlation. As indicated in Sect. 3, we then extend the model Y = Xβ + u by an autoregressive process of the residuals u, taking into account the autocorrelation (Wooldridge 2013, ch. 12), which should reduce the potential bias in the estimated coefficients (Epple and McCallum 2006). Besides the lagged dependent variables this is a second reason for having dynamic models. Econometrically this deals with unit roots and avoids problems from lack of cointegration. Economically this takes estimated expectations and adjustment processes implicitly into account (Pesaran 2015). 31 Abelesa and Cherkasky (2020) show that even in these cases of constant ratios the long-run debt/GDP ratio can be very high. 32 This stability condition is known from models which replace the savings gap or the current account, I-S = M-X, by trade balance deficit and interest payments dF = TBD + rF. The long-run GDP ratio can be very high even in the case of stability, r < g; it is F/GDP = TBD/(g-r), which can be very high if r is close to g.
Do we observe a strong dynamic complementarity between the public and private (domestic) stocks of R&D? If so, how does this change the model specification? We could find only data for aggregate R&D expenditures (GERD in statistical terms) for Brazil. Soete et al. (2022) find complementarity of public and private R&D for many countries, but not for all. In countries where the complementarity exists, private firm also do fundamental R&D and public institutions also do applied R&D. If we could find the data, we could split each R&D/GDP ratio into private (BERD) and public (GERD minus BERD) changing each R&D variable into two and the R&D equation would be replaced by two R&D equations, one for private and one for public R&D. Moreover, we would check the role of OECD R&D in driving domestic R&D variables (spillovers and competition) and technical change. This might lead to the result that there are two (weakly) exogenous driving forces: world GDP working through exports and OECD R&D working through (semi-) endogenous technical change.

Consequences of a world GDP shock
In order to analyse the ideas of Thirlwall and Prebisch, we now impose a permanent increase on the intercept of the world income equation by a half percent, 0.005. This effect plays through the whole system of equations. Figure 4 shows the major effects for the period 1960-2030. The higher set of curves with units on the right vertical axis show the baseline mean, the scenario means, and the actuals. The difference  between baseline and actuals is shown in the lower curve with units on the left vertical axis. In percentages, the calculated growth rate of world income goes from 0.005 to 4.2% above the baseline simulation. Export quantities show a high increase as expected from the income elasticity of exports of 0.94 in Eq. (2). After all feedback effects through output changes, terms of trade are up to three percent higher than baseline as expected from the Prebisch-Singer perspective. Output also shows positive changes as expected by the Thirlwall perspective. The effects are statistically significant except for periods around the crisis years 2009 and 2020. The effects are initialized by the effect of world GDP on exports in (2) reducing foreign debt, the imports of machinery in (3) increasing foreign debt, demand triggering labour force participation in (12), world GDP growth enhancing the terms of trade growth in (15), and a positive effect on net labour income from abroad in (21). From there, the whole model is affected. These are the channels that explain the high correlation between domestic GDP, exports and world GDP in levels and growth rates in Arestis and Baltar (2019) and earlier in Bértola et al. (2002) as well as the VAR and VECM papers mentioned above. Similarly, in a multi-country spillover analysis Abosedra et al. (2020) detect trade as the major channel of spillovers going mainly from rich to poor countries as world GDP goes to Brazil here. This raises the question, which factors of production are increasing how much. Figure 5 shows the results. The Keynesian expectation that unemployment falls comes out here as du = − 0.1% but the effect is statistically insignificant and small compared to an unemployment rate of 13% in 2020. The labour force reacts with going from between zero and 0.74% beyond baseline and this is statistically significant for most periods. Foreign capital is between 0.13% and 3.5% above baseline and significantly so until 2025. Domestic capital is between zero and 2.7% above baseline, which is statistically significant mostly in the later periods. The effect on imported capital expected on the basis of the Bardhan-Lewis model is the strongest effect of the factor input changes in terms of percentages. 33 Figure 10 shows all results from this world growth scenario confirming that all equations are interacting. Among these effects, the increase in output has unpleasant but small consequences: human capital decreases by 0.09%, which is statistically significant only in the later periods; R&D and technical change fall but in a statistically insignificant way. The residual determination of net secondary income from abroad does not play a role in determining the results: their change is negative until 2022 and later changes to being positive are first small and later statistically insignificant.

Human capital and R&D changes
World GDP growth is a driving force that allows the economy to grow even without technical change if export revenues are used to buy machinery. This comes with the disadvantage that the economies cannot change world income growth. However, domestic growth can be strengthened through human capital and R&D leading to more technical change. In Fig. 6 we show the main effects of human capital changes by an enhancement of the intercept by 0.001. Human capital increases R&D, which increases technical change. Together they enhance human capital again. All effects are statistically significant, but those for R&D and technical change phase out before 2030. Output effects remain high because human capital stays high. Figure 11 shows all effects of this human capital policy scenario. We are not aware of literature that doubts that additional human capital and R&D expenditure in Brazil would be worth the opportunity costs in terms of tax money, reduction of other expenditure, or additional public debt. Therefore, we do not model all these types of variables, which would enlarge the models by many variables and equations. Also, we do not have information on the cost of increasing the human capital index by up to 0.1. The revenues run up to 500 billion pesos (100 billion dollars), while the R&D/GDP ratio changes by up to 0.017 after a permanent human capital change.
R&D policies have more persistent effects in Fig. 7 than human capital policy in Fig. 6. We enhance the intercept of the R&D equation by 0.001. Additional R&D enhances technical change and together they trigger more human capital. Technical change and human capital then enhance output. After ten years the level effects on R&D and technical change get lower. The GDP change in Fig. 7 runs up to 93 billion pesos; the change of the R&D/GDP ratio has a peak at 0.01; in addition, there would be costs of human capital growth. Growth rate differences could be shown   . 6 The main effects of a permanent change of human capital policy. Axes and curves are explained in Fig. 4 for the period 2001 to 2021. This may justify speaking of semi-endogenous growth. Figure 12 shows all effects of this R&D policy scenario.
The human capital and R&D policies decrease the terms of trade, and foreign capital is replaced by domestic capital. Savings increase less than investment and foreign debt grows, but less so then GDP. The size of the shocks is not comparable as H and R&D have different dimensions. Therefore, the size of the results is also not comparable.

Marshall-Lerner condition and the Harberger-Laursen-Metzler effect
Finally, our model is able to look at the Harberger-Laursen-Metzler effect (HLME): A change in the terms of trade may have short run effects in line with the Marshall-Lerner conditions, but through dynamic effects the accumulation of foreign debt may go into the opposite direction, HLME ≡ DF < 0 for a positive terms of trade shock. Figure 8 shows the main effects of increasing the intercept of the termsof-trade equation. The terms of trade go up by zero to 0.5% compared to baseline. Through the long-term price elasticity of exports of almost unity, the value of exports hardly changes in the upper left part of Fig. 8, but the import functions have price elasticities summing up to 2, ignoring additional dynamic effects in (3) and (4), thereby fulfilling the Marshall-Lerner condition with a lag of two years.

Fig. 7 Simulation of R&D/GDP policy changes
Economic Change and Restructuring (2023) 56:1147-1183 One would therefore expect higher debt, dF > 0, as shown in the lower right part of Fig. 8. The HLME would suggest that dynamic effects could overrule this result, but this is not the outcome here. Figure 13 shows all effects of this terms-of-trade shock scenario.

Summary and conclusion
Our regressions reveal that human capital is currently reduced by higher GDP growth. Education should be made more attractive compared to earning money, especially in boom periods. Another important regression result is that R&D weakly affects technical change, which may go to zero in spite of the presence of R&D and calls for a policy linking R&D and technical change more closely.
The baseline simulation shows that Brazil is an unstable economy in the sense that investment is larger than savings leading to increased debt. The private sector raises the interest rate, but the savings-investment difference, although interest elastic, and debt formation do not react strongly to this. Also, policy reactions of savings to high and increasing debt do not stop the development of this problem. The policy reaction function needs to be strengthened and should generate more savings. This does not necessarily mean that government should do this through reduction of budget deficits. Tax and subsidy measures providing incentives for savings of households may also be useful.
Permanent changes of world GDP, which are not under the control of the Brazilian government, have level effects as suspected by Thirlwall and Prebisch, and only temporary, semi-endogenous growth rate effects in Brazil. Additional world income growth triggers importing capital goods and more labour supply and only little other input growth from unemployment or domestic investment. This supports the relevance of models with imported capital goods more than the traditional Keynesian background of BoPC growth models in the case of Brazil for the period under consideration. This conclusion follows under the assumption that unemployment rates capture unemployment correctly. If, in contrast, unemployment statistics are administratively biased, the unemployed may actually not be well captured and the labour supply reaction may actually be an unemployment reaction.
Permanent enhancements of human capital and R&D increase also technical change and output but decrease the terms of trade leading to the use of more domestic instead of imported capital goods.
The Marshall-Lerner condition holds when looking at prices with lags up to two years mainly because of high price elasticities of imported machinery, whereas other imports and exports have a low price elasticity, which are in sum still large enough to satisfy the ML condition though. Increasing terms of trade lead to higher imports and marginally positive effects on exports because of a slightly lower than unit long-run price elasticity. This leads to increased foreign debt and not to dominant dynamic counter-acting effects on savings or investments as suspected by the Harberger-Laursen-Metzler idea.
Foreign debt increases more strongly than domestic GDP under a world GDP enhancement and less strongly under a human capital or R&D expansion. Human capital and R&D are therefore not only growth policies but also would help stabilizing the Brazilian economy in regard to foreign debt dynamics.
Overall, all results are based on a model that has two driving forces, growth of productivity and world GDP, which the BoPC and the neoclassical two-gap models have in common. Both these growth rates are important and should not be neglected because we show that they are empirically important.

Fig. 13
Effects of terms of trade intercept changes. Axes and curves are explained in Fig. 4