How Much Do Model Choices Move Digital Trade Elasticities?

Economists summarize how strongly trade responds to digital infrastructure with a single number, an elasticity. One example is the finding that a 1% rise in a county's e-commerce index goes with a 0.546% rise in exports. That number comes from one log-linear regression. Machine learning offers flexible models that can fit trade data with nonlinear interactions. But on panels as small as these (tens of counties, a dozen provinces, fifteen countries over a decade), several such models can predict equally well and still imply very different elasticities. This note proposes to treat a model ensemble, meaning a committee of differently built predictors, as a way to measure that disagreement rather than mainly as a way to cut prediction error. We fit diverse, cross-validated learners. From each we compute the implied elasticity of exports with respect to digital development. We then report the spread of elasticities across learners that predict about equally well, alongside a weighted consensus.

The question matters because published digital-trade elasticities feed planning decisions. Examples include whether transport investment amplifies the payoff of e-commerce, and whether digital platforms drive exports but not imports. Yet the literature gives no estimate of how much of each number comes from the authors' choice of model. Ensembling is the natural tool for asking that question, provided the committee is pooled at the level of the derivative instead of the prediction.

Core Claim

Ensemble disagreement on predictions and ensemble disagreement on elasticities are different quantities. On small trade panels the second can be large while the first is small. This means predictive accuracy alone does not identify the elasticity a policymaker wants. We claim three things. First, an "elasticity disagreement ratio", the elasticity-level analogue of the disagreement-error ratio of When are ensembles really effective?, is a measurable and reportable specification uncertainty for digital-trade elasticities. Second, a stacked consensus of the members' elasticities recovers known, nonlinear moderation effects better than either a single flexible model or a gravity regression with a hand-chosen interaction term. Third, when the true relation is close to log-linear, the procedure collapses to the gravity estimate rather than inventing heterogeneity. The third property is what keeps the method honest.

Concretely, let $\hat f_m$ be ensemble member $m$, fitted to predict log exports $y_i$ from covariates including log digital index $d_i$. Its average elasticity is

$$\bar\varepsilon_m = \frac{1}{N}\sum_{i=1}^{N} \frac{\hat f_m(x_i, d_i+\delta) - \hat f_m(x_i, d_i-\delta)}{2\delta},$$

where $x_i$ are the other covariates for observation $i$, $N$ is the sample size, and $\delta$ is a small step in log digital index. We use a finite difference because trees are not differentiable. The conditional version is the same average restricted to subgroups, for example observations with high versus low transport quality. Among members whose out-of-fold error lies within a tolerance of the best member, the elasticity disagreement ratio is the across-member standard deviation of $\bar\varepsilon_m$ divided by the sampling standard error of the gravity estimate. A value well above 1 means model choice moves the elasticity more than sampling noise does.

What Exists and Where This Departs

The elasticity literature supplies the targets and the motivation. The Influences of E-Commerce on International Trade - Evidence from Zhejiang Province of China estimates a log-linear gravity equation on 40 Zhejiang counties. It reports export elasticity 0.546, total-trade elasticity 0.597, and a non-significant import coefficient of 0.292. Two panel studies use fixed effects instead. How does the development of the digital economy in RCEP member countries affect China's cross-border e-commerce exports? uses fixed effects and System GMM and finds that partner transport quality and institutions amplify the digital effect. The Impact Mechanism and Regional Comparison of the Coupling between China's Maritime Economy and Digital Economy on Balanced Development of Foreign Trade uses an entropy-weighted coupling index with double fixed effects. All three commit to one functional form and report heterogeneity only along dimensions the authors chose in advance. We keep their estimands but refuse to fix the form.

International Trade Flow Prediction with Bilateral Trade Provisions is the closest machine-learning work on trade. It runs an MLP with SHAP-based selection of trade-agreement clauses, followed by a factorization machine that reaches an RMSE of 3.26 on log agricultural trade. That paper optimizes prediction with a single model and reports no elasticity and no digital variables. We reuse its dataset as a larger testbed, but our estimand is a derivative and our object of study is disagreement across models.

On the ensembling side, two papers supply methods. When are ensembles really effective? supplies the disagreement-error diagnostic and the observation that interpolating deep nets lose disagreement while random forests do not. That is a constraint on our committee design: members must not all interpolate. The stacking design of Assessment of Ensemble Learning to Predict Wheat Grain Yield Based on UAV-Multispectral Reflectance combines random forest, SVM, Gaussian process and ridge through a linear meta-learner and raises R² to 0.628 against 0.468–0.612 for single models. It shows that stacking helps prediction on small tabular data. It says nothing about whether the stacked derivative is trustworthy, which is our question. Negative results on naive pooling act as a further constraint. Multiple Run Ensemble Learning with Low-Dimensional Knowledge Graph Embeddings and Effective Slot Filling Based on Shallow Distant Supervision Methods both report that plain averaging dilutes signal when members capture different structure. That is why we compare stacked weights against uniform weights on elasticities.

Research Program

We build one committee per dataset. The members are:

  • the gravity regression itself, log-linear OLS or fixed effects, as in the source papers;
  • ridge regression with all pairwise interactions;
  • a factorization machine, following Pan et al.;
  • a random forest;
  • gradient-boosted trees with monotonicity off;
  • a Gaussian process;
  • a small MLP with early stopping, so it does not interpolate.

Every member is fitted with grouped cross-fitting, holding out whole counties, provinces, or countries rather than single rows, so out-of-fold errors reflect generalization to unseen units. For each member we compute average and conditional elasticities with the finite-difference formula above, and bootstrap over units for sampling standard errors. We then compute two things. One is the prediction-level disagreement-error ratio, using the regression version of ambiguity: ensemble squared error equals average member error minus average spread. The other is the elasticity disagreement ratio defined above. The consensus elasticity weights members by stacking weights learned on out-of-fold predictions, and we compare it with uniform weighting and with weights restricted to near-best members.

Ground truth is unknown for real data, so the core of the program is semi-synthetic. We keep each real panel's covariates and unit structure and replace the outcome with a simulated one. The simulated outcome has a known elasticity function across four regimes. The first is constant elasticity at the gravity estimate, for example 0.546 for Zhejiang. The second is linear moderation by transport quality, which the RCEP specification can capture. The third is threshold or saturating moderation by the coupling index, which it cannot. The fourth has a confounder that drives both digital index and exports. Noise is calibrated to the gravity residual variance. This tells us when the committee's spread and consensus track the truth and when they mislead. In particular, it shows whether high elasticity disagreement actually flags the regimes where single models get the elasticity wrong.

The data are small, and this is the main risk. The Zhejiang AEDI panel covers 40 counties over 2014–2015, the coastal-province panel covers 11 provinces over 2011–2020, and the RCEP panel has roughly 14 partners over 2012–2021. We expect flexible members to win little or nothing on prediction there, and we treat that as a finding to report. The DTA agricultural-trade data from Pan et al. is far larger. We use it to test how disagreement behaves as sample size grows, by subsampling it to the sizes of the small panels, with tariff-agreement depth standing in for the digital variable. The RCEP and coastal panels must be rebuilt from the public sources those papers name (World Bank indicators, NetEco e-commerce exports, Global Competitiveness transport scores, CEPII distances), so exact replication of their coefficients is a first checkpoint rather than an assumption.

Baselines

Gravity regression. The naive reference point is each source paper's own model: log-linear OLS for Zhejiang, two-way fixed effects for RCEP and the coastal provinces, with the published interaction terms. For Zhejiang the reported number is an export elasticity of 0.546 (Liu). For RCEP and the coastal panel, the file gives significance and direction but no numerical coefficient: no reported result was found on Lacuna for the RCEP digital-economy coefficient or for the coupling-index slope. We first reproduce these, then run them under the same grouped cross-fitting as every other member. That way the comparison uses identical folds, and any gap in out-of-fold error or elasticity recovery is not an artifact of in-sample fitting. On semi-synthetic data, the proposal beats this baseline if it has lower error in recovering the true conditional elasticity in the threshold and saturating regimes while matching it within bootstrap noise in the constant-elasticity regime. Losing the constant-elasticity regime would count against the proposal.

Strongest single flexible model. The strongest existing machine-learning method on trade is the factorization machine of Pan et al., which reports an RMSE of 3.26 on log agricultural trade volumes. Alongside it we run gradient-boosted trees, the usual tabular default. Each gets the same hyperparameter budget as the whole committee combined, so the ensemble does not win through extra tuning. On the DTA data we first check that our factorization machine reaches the neighborhood of 3.26 under their protocol. Then we compare elasticity recovery on semi-synthetic outcomes. Beating it means lower mean error on the true conditional elasticity. It also means calibrated intervals: committee spread plus bootstrap error should cover the truth at close to nominal rates, while a single model's bootstrap interval alone undercovers.

Ablations. Two ablations isolate the key ingredient, which is pooling at the derivative with diversity across model families. The first averages predictions and then differentiates the averaged predictor, compared with averaging the members' derivatives. The second replaces the heterogeneous committee with a same-family committee of boosted trees that differ only in seed. If the seed-only committee shows the same elasticity spread and the same recovery, then model-family diversity is not doing the work, and the claim shrinks to ordinary bootstrap uncertainty.

Why not just…?

Why not just add the right interaction terms to the gravity model? This is the most serious threat. The RCEP study already captures transport-quality moderation this way (Wang, Xu et al.). If the true moderation is linear in a variable the researcher thought to include, a well-specified interaction regression will be more efficient than any committee. The semi-synthetic linear-moderation regime is designed to show exactly that, and we expect the regression to win or tie there. The proposal's value lies elsewhere: in regimes where the moderator enters through a threshold or saturation, as the coupling index's climb from 0.063 to 0.992 in Song et al. suggests is plausible. It also lies in telling the analyst whether their chosen form is fragile. Because the gravity model is itself a committee member, the method cannot do worse than ignoring it, apart from the variance cost of the stacking weights, which we measure.

Why not just fit one boosted-tree model and read off SHAP values or partial dependence? A single model gives a single elasticity surface with no indication of how much a different, equally accurate model would change it. SHAP attributions, as used in Pan et al., rank features rather than yielding percent-on-percent responses. On small panels, the analysis in When are ensembles really effective? implies that different families make different errors. That diversity is precisely what the single model hides. The single-model baseline and the coverage test above decide this empirically. If one model's bootstrap intervals already cover the true elasticity as well as committee intervals do, this alternative wins and we will say so.

Why not just average predictions with equal weights? Equal averaging of predictions is cheap and often hard to beat for accuracy. But the derivative of an averaged predictor mixes the members' slopes in a way that can wash out heterogeneity that only some members capture. Prior reports that naive pooling dilutes structured signal (E-Vahdati et al.; Barth et al.) make this a reasonable worry but do not settle it for regression derivatives. The first ablation tests it directly. We expect equal averaging to be competitive for average elasticities and weaker for conditional ones. If it is not weaker, the stacking layer should be dropped.

Proposed Experiments

The decisive experiment is the semi-synthetic grid: four elasticity regimes crossed with the three real covariate panels and four DTA subsample sizes. For each cell we report three things. The first is error in recovering average and conditional elasticities. The second is interval coverage. The third is whether the elasticity disagreement ratio exceeds 1 more often in the regimes where single models fail. The outcome that would confirm the core claim is this pattern together: elasticity disagreement high where prediction-level disagreement is low, consensus elasticities closer to truth than the factorization machine or boosted trees in the nonlinear regimes, and agreement with gravity in the constant regime. The outcome that would refute it is committee spread uncorrelated with actual single-model elasticity error. In that case disagreement is not a useful warning, and the paper becomes a negative result about ensembles on economic panels.

On real data, we then report the committee's elasticities for the three questions the source papers raise. The first is whether the Zhejiang export elasticity of 0.546 survives across near-best members. The second is whether the non-significant import elasticity stays near zero across members or only under log-linearity. The third is whether transport-quality and coupling moderation in the RCEP and coastal panels appear as smooth slopes or as thresholds. We also check that the interpolation-cliff pattern of Theisen et al., where deep members lose disagreement and forests keep it, appears on trade panels. If it does not, that is a new data point on how the disagreement-error law transfers to small tabular economic data.