1. Introduction and Research Context
Modern quantitative international trade and spatial economics—synthesized by Costinot and Rodriguez-Clare (2014) and Redding and Rossi-Hansberg (2017)—rely heavily on exact hat-algebra counterfactuals to translate observed trade matrices and transport networks into welfare predictions for tariff shocks, global supply-chain fragmentation, and public infrastructure expansion (Dekle, Eaton, & Kortum, 2007; Dekle, Eaton, & Kortum, 2008; Arkolakis, Costinot, & Rodriguez-Clare, 2012). By conditioning directly on baseline expenditure shares rather than estimating high-dimensional productivity and trade-cost primitives, exact hat algebra confers immense empirical tractability. Yet that very shortcut exposes welfare counterfactuals to an overlooked statistical vulnerability: baseline bilateral trade flows, domestic absorption, and traffic counts are treated as error-free constants even though official international trade records exhibit pervasive reporting discrepancies between importers and exporters (Linsi, Burgoon, & Mugge, 2023).
Sanders (2026a), published in The Review of Economics and Statistics, addresses this methodological gap by introducing an Empirical Bayes uncertainty-quantification framework inspired by Efron and Morris (1973). Leveraging repeated mirror-trade observations where both partner statistical agencies report the same bilateral shipment, the framework estimates pair-specific measurement-error variances, pairs them with a gravity-based prior distribution, and draws posterior realizations of the latent baseline economy. A single-step algorithm propagates baseline measurement uncertainty through nonlinear general-equilibrium operators, while a two-step algorithm combines data measurement error with structural parameter estimation error. Applied to a 76-country Armington economy, the nonparametric China trade shock of Adao, Costinot, and Donaldson (2017), and the U.S. Interstate Highway System study of Allen and Arkolakis (2022), the paper delivers a striking substantive message: uncertainty originating in baseline data error frequently dwarfs conventional parameter estimation error and systematically shifts counterfactual point estimates via nonlinear equilibrium mappings.
This independent reproducibility investigation advances beyond numerical confirmation to deliver five verified empirical and methodological contributions.
First, we acquire the complete Tier-1 Harvard Dataverse archive (Sanders, 2026b), authenticate file integrity via MD5 digests, and standardize all three applications into a self-contained dataset supporting twelve harmonized specifications – executed independently across Python, R, and StataNow 19.5 MP with a maximum cross-engine discrepancy of .
Second, while reconstructing the Armington fixed-point equilibrium from scratch, we uncover a substantive MATLAB operator-precedence bug on line 14 of solve_Y_hat.m coupled with an overly coarse convergence criterion of ; Correcting the destination-expenditure parentheses and tightening convergence to in alters baseline welfare losses sharply for trade-deficit economies, enlarging the Central African Republic's loss by .
Third, benchmarking the paper's log-linear OLS gravity prior against Poisson pseudo-maximum likelihood estimation following Silva and Tenreyro (2006) in reveals that dropping 1,590 zero trade pairs inflates the prior distance elasticity magnitude by .
Fourth, directly testing the additive exporter-plus-importer Poisson shrinkage specification in demonstrates that bilateral flow scale and geographic distance remain highly significant predictors of mirror-trade variance even after absorbing all exporter and importer fixed effects.
Fifth, our sensitivity audit of the Adao, Costinot, and Donaldson (2017) winsorization threshold and the Allen and Arkolakis (2022) posterior draws documents how truncating of mirror-trade variances artificially narrows 2011 welfare uncertainty by , while confirming a rank-reversal risk between the second- and third-highest highway return links.
2. Empirical Data and Econometric Methodology
2.1. Tier-1 Original Data Provenance and Sample Construction
Every empirical series analyzed in this study originates directly from the public CC0 1.0 Harvard Dataverse archive deposited by Sanders (2026b), comprising the 86,050-byte README.pdf documentation and the 77,046,010-byte compressed archive MECQTSM.zip. Cryptographic MD5 checksums for both artifacts match the repository manifest verbatim, establishing full Tier-1 empirical provenance with zero synthetic or simulated substitutes. To enforce identical data ingestion across Python, R, and StataNow 19.5 MP, all relevant analytical tables across the three empirical blocks are consolidated into a single UTF-8 analytical file sanders_2026_trade_me.csv containing 410,223 records and 32 variables.
The first block underpins the 1996 multi-country Armington counterfactual. It merges the 1986–2006 dyadic mirror-trade panel compiled by Linsi, Burgoon, and Mugge (2023) with capital-to-capital geographic distances from CEPII GeoDist and the 77-by-77 World Input-Output Database 1996 bilateral trade and domestic absorption matrix. The full square grid contains 5,929 cells consisting of 77 diagonal domestic absorption entries and 5,852 off-diagonal international pairs, among which 4,262 report strictly positive importer-recorded 1996 trade flows and 1,590 record zero trade. Archival code inspection exposes two critical sample-hygiene subtleties.
First, Belgium registers zero bilateral flows across all partners in the 1996 mirror-trade file because historical reporting consolidated the Belgium–Luxembourg Economic Union; As a result, Belgium is silently excluded prior to general-equilibrium solution, reducing the active trading world from 77 to 76 countries spanning 5,776 matrix entries and 5,700 international pairs.
Second, Mirror_trade_Armington.R sorts economies alphabetically with Argentina first and the United States in position 71, whereas the shipped posterior draw file, countries.csv, and bilateral_1996.xls place the United States at index 1; Preserving exact bilateral_1996.xls indexing is essential for faithful equilibrium alignment.
The second block captures the nonparametric China trade-integration application of Adao, Costinot, and Donaldson (2017). The mirror-trade input table contains 22,032 observations covering 36 non-U.S. exporters trading with 36 importers over 17 years from 1995 through 2011, paired with residualized 2011 gravity pairs reproducing Figure 6, pairs entering the 2011 two-way fixed-effects gravity regression, and the 16-year sequence of 1996–2011 China welfare counterfactual credible intervals extracted directly from the baseline and -winsorized posterior output matrices. Although full re-estimation of the underlying generalized method of moments estimator requires two external binary files housed in the separate Adao, Costinot, and Donaldson (2017) archive, every Empirical Bayes mirror-trade input, gravity diagnostic file, and counterfactual draw distribution is present inside the Sanders (2026b) package.
The third block covers the U.S. Interstate Highway System infrastructure study of Allen and Arkolakis (2022). It combines highway origin-destination pairs documenting residualized log highway length, residualized log vehicle miles traveled, and standardized gravity residuals alongside valid two-step posterior draws for the top three highway link return-on-investment rankings. Auditing the raw me_two_step.csv file reveals five trailing summary and blank rows appended directly below draw 1,000; Explicit row filtering guarantees exact sample integrity for rank-reversal inference.
| Variable and Empirical Application | N | Mean | Std. Dev. | Min | Max |
|---|---|---|---|---|---|
| Armington: 1996 Positive Bilateral Trade in Logs | 4,262 | 2.4325 | 3.5089 | -12.7169 | 11.9813 |
| Armington: Bilateral Capital Distance in Logs | 4,262 | 8.7360 | 0.8007 | 4.7104 | 9.8908 |
| Armington: Raw Mirror-Trade ME Variance | 5,852 | 0.9861 | 2.5385 | 0 | 46.5806 |
| Armington: Two-Way Poisson FE Shrunk ME Variance | 5,852 | 0.9861 | 1.1371 | 0.0009 | 13.2611 |
| Armington: Trade Openness Across 76 Countries | 76 | 0.4059 | 0.1750 | 0.0901 | 0.9255 |
| Armington: Posterior Welfare Standard Deviation (%) | 76 | 0.2698 | 0.3171 | 0.0563 | 2.3145 |
| ACD (2017): Log Bilateral Trade Flows 1995–2011 | 22,032 | 6.7779 | 2.2124 | -5.9915 | 13.4439 |
| ACD (2017): Baseline Empirical Bayes Weight | 22,032 | 0.8848 | 0.1535 | 0.1380 | 1 |
| AA (2022): Residualized Log Highway VMT | 378,838 | 0.0153 | 0.8179 | -7.0091 | 9.9794 |
| AA (2022): Standardized Highway Gravity Residual | 378,838 | 0.0216 | 1.0000 | -5.9332 | 17.8661 |
Note: Computed directly from the standardized dataset derived from the Harvard Dataverse archive of Sanders (2026b). Trade openness equals the import expenditure share for each of the 76 economies.
Table 1 underscores the extreme right-skewness of bilateral mirror-trade discrepancies. Across 5,852 country pairs, raw measurement-error variance averages yet exhibits a standard deviation of and reaches a maximum of . Two-way Poisson fixed-effects shrinkage preserves the exact grand mean of through the adding-up property of the Poisson score while lowering the cross-pair standard deviation to , an reduction in variance dispersion. Within the 22,032-observation panel of Adao, Costinot, and Donaldson (2017), the baseline Empirical Bayes weight averages , demonstrating that while observed trade flows retain dominant weight on average, shrinkage toward the gravity prior exerts substantial influence across noisier corridors.
2.2. Econometric Specifications and Tri-Runtime Verification Protocol
In the Empirical Bayes measurement model of Sanders (2026a), true bilateral log trade from exporter to importer in year is observed through two noisy mirror records: importer-reported and exporter-reported . Under classical symmetric independent reporting errors with zero mean and bilateral variance , the sample variance estimator pooling all jointly positive reporting years is:
Where:
- and denote log bilateral trade flows recorded by importer and exporter over the 1986–2006 mirror panel.
- is the set of years with strictly positive dual reports for pair , with cardinality .
- measures the unshrunk pair-specific variance of bilateral measurement error.
To construct the Empirical Bayes prior mean , Sanders (2026a) fits a two-way fixed-effects log-linear gravity equation by OLS on positive flows in for 1996 and for 2006. Because discarding zero trade flows and log-transforming heteroskedastic multiplicative errors induces Jensen's inequality and sample-selection bias (Silva & Tenreyro, 2006; Head & Mayer, 2014), we pair with the multiplicative Poisson pseudo-maximum likelihood estimator retaining all non-Belgium pairs:
Where:
- represents 1996 bilateral trade levels entering PPML in , while is restricted to positive pairs in .
- and absorb exporter and importer multilateral resistance fixed effects following Anderson and van Wincoop (2003).
- denotes CEPII capital-to-capital geographic distance, with elasticities and under log-OLS and PPML respectively.
To regularize noisy pair-level variance estimates, the original study applies two-way Poisson fixed-effects shrinkage , which we verify and calibrate via on pairs. That specification implicitly imposes separability: conditional on exporter and importer institutional reporting quality, measurement-error variance is assumed orthogonal to bilateral trade volume and distance. We formally test this identifying restriction in on pairs with positive 1996 trade and positive raw variance:
Where:
- and absorb all exporter-specific and importer-specific unobserved reporting quality.
- and capture residual bilateral elasticity of mirror-trade variance with respect to trade scale and distance.
- Additive separability requires the joint null hypothesis .
For positive flows, combining prior mean , shrunk prior variance , and shrunk error variance produces a conjugate log-normal posterior governed by Empirical Bayes weight , posterior mean , and posterior variance , augmented by Bernoulli probabilities distinguishing true zeros from spurious reporting zeros.
In the 76-country Armington counterfactual evaluating a uniform rise in international trade costs for with trade elasticity , let denote gross output, total destination expenditure, expenditure shares, and baseline trade deficit ratios such that . Exact Dekle–Eaton–Kortum market clearing and real welfare changes satisfy:
Where:
- denotes the counterfactual-to-baseline ratio of nominal income in economy .
- measures the proportional shift in importer 's expenditure share allocated to goods from exporter .
- scales importer 's output into total market expenditure inside the sum over destination markets.
- translates the domestic expenditure share shift into percentage real welfare change per Arkolakis, Costinot, and Rodriguez-Clare (2012).
Crucially, line 14 of the author's MATLAB solver solve_Y_hat.m omits enclosing parentheses around destination expenditure. Because matrix multiplication and elementwise multiplication share identical operator precedence in MATLAB and evaluate left to right, the shipped code inadvertently solves , applying the exporter's own deficit multiplier outside the sum instead of each destination's expenditure multiplier inside the sum, while terminating early at precision = 0.01. Model replicates this exact left-to-right precedence to verify alignment with the archived .mat output, whereas restores the economically valid Dekle–Eaton–Kortum system at tolerance alongside sensitivity checks at and . Finally, regresses cross-country posterior welfare standard deviations on trade openness , log gross output, and mean shrunk error variance across economies; Models and replicate the Adao, Costinot, and Donaldson (2017) residualized and two-way fixed-effects gravity fits plus winsorization audit; And and verify the Allen and Arkolakis (2022) highway gravity elasticity across links and top-three link rank-reversal probabilities across draws.
3. Tri-Runtime Empirical Results and Diagnostic Extensions
3.1. Cross-Engine Parity, Armington Counterfactual Replication, and DEK Precedence Correction
| Model ID | Focal Variable | Python | R | StataNow 19.5 MP | N | R² | Max Diff (%) | Status |
|---|---|---|---|---|---|---|---|---|
| M01 | ln_dist | -1.528060 (0.039799) | -1.528060 (0.039799) | -1.528060 (0.039799) | 4,262 | 0.7974 | 0.00000002% | PASS |
| M02 | ln_dist | -1.678910 (0.039854) | -1.678910 (0.039854) | -1.678910 (0.039854) | 4,942 | 0.7973 | 0.00000002% | PASS |
| M03 | ln_dist | -0.888716 (0.034537) | -0.888716 (0.034537) | -0.888716 (0.034537) | 5,700 | 0.9146 | 0.00000004% | PASS |
| M04 | ln_dist | 0.275723 (0.050343) | 0.275723 (0.050343) | 0.275723 (0.050343) | 3,474 | 0.4360 | 0.00000005% | PASS |
| M05 | me_var_fitted | 0.992356 (0.062833) | 0.992356 (0.062833) | 0.992356 (0.062833) | 5,852 | 0.1976 | 0.00000003% | PASS |
| M06 | mean_76_welfare | -3.187545 (0.236091) | -3.187545 (0.236091) | -3.187545 (0.236091) | 76 | 1.0000 | 0.00000000% | PASS |
| M07 | mean_76_welfare_corr | -3.416860 (0.243823) | -3.416860 (0.243823) | -3.416860 (0.243823) | 76 | 0.8091 | 0.00000000% | PASS |
| M08 | Trade Openness | 1.436036 (0.387104) | 1.436036 (0.387104) | 1.436036 (0.387104) | 76 | 0.4214 | 0.00000001% | PASS |
| M09 | res_log_dist | -0.276549 (0.079790) | -0.276549 (0.079790) | -0.276549 (0.079790) | 1,332 | 0.0088 | 0.00000000% | PASS |
| M10 | ln_dist | -0.214301 (0.079896) | -0.214301 (0.079896) | -0.214301 (0.079896) | 1,296 | 0.4768 | 0.00000000% | PASS |
| M11 | res_log_length | 1.002577 (0.004282) | 1.002577 (0.004282) | 1.002577 (0.004282) | 378,838 | 0.7744 | 0.00000001% | PASS |
| M12 | gap_12_mean | 2.164960 (1.364903) | 2.164960 (1.364903) | 2.164960 (1.364903) | 1,000 | 0.1475 | 0.00000000% | PASS |
Note: Figures in parentheses display harmonized HC1 robust standard errors or cross-sectional standard errors for general-equilibrium and posterior summary quantities. Model reports the Silva and Tenreyro (2006) squared correlation , while and report squared correlation with the archived 76-country baseline_theta_5.mat vector.
This machine-precision agreement eliminates software implementation artifacts as a possible explanation for any substantive divergence documented below. Table 3 juxtaposes the author's published Armington welfare predictions and Empirical Bayes posterior distributions from against the corrected Dekle–Eaton–Kortum general equilibrium in across the four headline economies featured in Table 1 of Sanders (2026a) and the 76-country average.
| Country or Aggregate | M06: Author Exact () | Posterior Mean | Posterior Median | 95% Credible Interval | M07: Corrected DEK () | Loss Shift (%) | Corrected DEK () | Corrected DEK () |
|---|---|---|---|---|---|---|---|---|
| Central African Republic | -1.0906% | -0.2718% | -0.2594% | [-0.4234%, -0.1392%] | -1.5194% | +39.31% | -1.6009% | -1.4456% |
| Netherlands | -5.1516% | -6.5647% | -6.5706% | [-7.1004%, -6.0454%] | -5.1860% | +0.67% | -5.3304% | -5.0375% |
| Sweden | -3.2498% | -3.5114% | -3.5100% | [-3.7876%, -3.2529%] | -3.0669% | -5.63% | -3.1625% | -2.9717% |
| United States | -1.0719% | -0.9923% | -1.0119% | [-1.2712%, -0.5599%] | -1.1757% | +9.69% | -1.2209% | -1.1340% |
| 76-Country Mean | -3.1875% | -2.0427% | -2.0460% | [-2.1462%, -1.9216%] | -3.4169% | +7.19% | -3.5235% | -3.3099% |
Note: Model reproduces the exact left-to-right precedence in solve_Y_hat.m line 14 with tolerance in 8 iterations, matching baseline_theta_5.mat within ; Model enforces exact destination expenditure parentheses with tolerance in 75 iterations.
Two major empirical takeaways emerge from Table 3. First, holding the author's solver fixed, our replication fully validates the central Empirical Bayes insight of Sanders (2026a): conventional point counterfactuals for both the Central African Republic at and the Netherlands at fall completely outside their respective posterior credible intervals of [-0.4234%, -0.1392%] and [-7.1004%, -6.0454%]. Because equilibrium welfare is a strongly nonlinear function of bilateral flows and spurious zeros, baseline data error does not merely widen confidence intervals—it induces systematic directional bias in plug-in welfare point estimates.
Second, correcting the operator-precedence bug and loose convergence threshold in produces economically large and statistically significant shifts across the global welfare distribution. Across all economies, the average welfare loss deepens by percentage points—a proportional increase from to with and —while the squared correlation between the published and corrected welfare vectors drops from to and the single largest country-level shift reaches percentage points.
Because the missing parentheses transfer each country's own trade-deficit ratio outside the summation, deficit-running economies experience severe understatement of welfare losses in the published code: the Central African Republic's loss increases by from to and the United States' loss expands by from to . Conversely, trade-surplus Sweden sees its welfare loss moderate by from to . Sensitivity checks across trade elasticities behave monotonically: lower substitutability at intensifies the corrected mean loss to , whereas higher substitutability at softens it to .

Note: Figure 1 contrasts conventional plug-in welfare estimates, Empirical Bayes posterior distributions, and corrected Dekle–Eaton–Kortum equilibria across headline countries and the full 76-economy sample.
To uncover what drives cross-country dispersion in counterfactual uncertainty—where posterior welfare standard deviations span from to percentage points—Table 4 reports the cross-country uncertainty regression alongside the residualized no-intercept gravity fits and .
| Model ID | Dependent Variable | Regressor | Estimate | HC1 SE | t Stat | p-Value | N | R² |
|---|---|---|---|---|---|---|---|---|
| M08 | Posterior Welfare SD in Armington | Trade Openness | 1.436036 | 0.387104 | 3.710 | 0.0004 | 76 | 0.4214 |
| — | Posterior Welfare SD in Armington | Log Gross Output | 0.038482 | 0.014901 | 2.582 | 0.0118 | 76 | 0.4214 |
| — | Posterior Welfare SD in Armington | Mean Shrunk ME Variance | -0.003037 | 0.038252 | -0.079 | 0.9369 | 76 | 0.4214 |
| M09 | ACD (2017): Residualized Log Flow | Residualized Log Distance | -0.276549 | 0.079790 | -3.466 | 0.0005 | 1,332 | 0.0088 |
| M11 | AA (2022): Residualized Log VMT | Residualized Log Length | 1.002577 | 0.004282 | 234.165 | < 0.0001 | 378,838 | 0.7744 |
Note: Harmonized HC1 robust standard errors across Python, R, and StataNow 19.5 MP. Model includes an intercept of with SE and ; Models and estimate no-intercept OLS matching Figures 6 and 8 of Sanders (2026a).
Model delivers a nuanced structural insight: a country's average bilateral measurement-error variance carries an economically and statistically negligible partial slope of with standard error and . Instead, trade openness with slope and , together with log gross output at and , accounts for of cross-country variation in welfare uncertainty. Intuitively, equilibrium welfare sensitivity scales with exposure to foreign goods; Highly open hubs such as the Netherlands exhibit nearly four times the posterior welfare standard deviation of the Central African Republic despite substantially higher statistical reporting quality.
3.2. Log-OLS Versus PPML Gravity Prior Bias and Rejection of Separable Variance Shrinkage
The statistical validity of Empirical Bayes posterior draws hinges directly on the prior gravity equation and the shrinkage model applied to raw mirror-trade variances. Table 5 consolidates all five gravity and variance-structure regressions – alongside the 2011 gravity benchmark for the Adao, Costinot, and Donaldson (2017) panel.
| Model ID | Econometric Specification | Regressor | Estimate | HC1 SE | t / z Stat | p-Value | N | R² |
|---|---|---|---|---|---|---|---|---|
| M01 | 1996 Gravity Prior OLS with Exp and Imp FE | Log Distance | -1.528060 | 0.039799 | -38.395 | < 0.0001 | 4,262 | 0.7974 |
| M02 | 2006 Gravity Diagnostic OLS with Exp and Imp FE | Log Distance | -1.678910 | 0.039854 | -42.127 | < 0.0001 | 4,942 | 0.7973 |
| M03 | 1996 PPML Gravity Including Zeros ex-Belgium | Log Distance | -0.888716 | 0.034537 | -25.732 | < 0.0001 | 5,700 | 0.9146 |
| M04 | OLS Determinants of Log Raw ME Variance TWFE | Log Distance | 0.275723 | 0.050343 | 5.477 | < 0.0001 | 3,474 | 0.4360 |
ln_flow | OLS Determinants of Log Raw ME Variance TWFE | Log 1996 Flow | -0.100970 | 0.021340 | -4.732 | < 0.0001 | 3,474 | 0.4360 |
| M05 | Two-Way Poisson FE Shrinkage Calibration OLS | Fitted ME Variance | 0.992356 | 0.062833 | 15.794 | < 0.0001 | 5,852 | 0.1976 |
| M10 | ACD 2011 Gravity OLS with Exp and Imp FE | Log Distance | -0.214301 | 0.079896 | -2.682 | 0.0074 | 1,296 | 0.4768 |
Note: All models report harmonized HC1 robust standard errors across Python, R, and StataNow 19.5 MP. Model yields an intercept of with SE and , confirming unbiased grand-mean calibration alongside modest explanatory power .
Comparing against highlights a major specification gap in the prior distribution. Estimating log-linear OLS solely over positive 1996 flows produces a steep distance elasticity of with HC1 standard error , and on positive 2006 flows in . Retaining all non-Belgium bilateral corridors including zero flows under Silva and Tenreyro (2006) PPML in slashes the distance elasticity to with HC1 standard error while raising squared-correlation fit from to . The log-OLS specification therefore overstates the magnitude of the prior distance decay by . Because spurious zero flows are imputed from the exponentiated prior mean and noisy positive flows shrink toward that prior, an overly steep distance elasticity systematically depresses posterior trade predictions on long-haul routes while inflating predicted trade between geographic neighbors.
Turning to measurement-error variance shrinkage, confirms that our independent two-way Poisson fixed-effects estimator reproduces the author's shrunk variance series to a correlation of and maximum absolute difference of , with a calibration slope of and an insignificant intercept of . Yet two-way fixed effects explain only of cross-pair variance variation. Model demonstrates why: after absorbing all exporter and importer fixed effects on corridors with , log raw measurement-error variance declines strongly with bilateral trade volume at with standard error and , while rising steeply with geographic distance at with standard error and . Thin, long-distance bilateral routes systematically suffer far larger mirror-trade discrepancies than additive exporter-plus-importer shrinkage assumes.

Note: Figure 2 contrasts 1996 gravity slopes under log-OLS and PPML alongside partial residual plots showing how mirror-trade variance falls with trade scale and rises with bilateral distance conditional on two-way fixed effects.
3.3. China Trade Shock Uncertainty Decomposition and Interstate Highway ROI RANK Reversals
Within the Adao, Costinot, and Donaldson (2017) nonparametric China trade integration setting, gravity explanatory power is notably weaker across the 36-economy sample: residualized OLS in on pairs yields a distance slope of with , while two-way fixed-effects OLS in on pairs in 2011 yields with . Standardized gravity residuals over the full 22,032-observation panel exhibit standard deviation . Table 6 reports the complete 1996–2011 decomposition of China's welfare gains into parameter estimation error, data measurement error, combined two-step baseline uncertainty, and the -winsorized robustness specification.
| Year | Point Est. | EE Only 95% CI | EE Width | ME Only 95% CI | ME Width | Combined 95% CI Base | Base Width | Combined 95% CI Winsor 0.2 | Winsor Width |
|---|---|---|---|---|---|---|---|---|---|
| 1996 | -0.0959% | [-0.1311%, -0.0725%] | 0.0586 | [-0.6414%, 0.0737%] | 0.7151 | [-0.9212%, 0.1070%] | 1.0282 | [-0.8871%, 0.1583%] | 1.0454 |
| 1997 | -0.0016% | [-0.0016%, -0.0011%] | 0.0004 | [-0.5102%, 0.2446%] | 0.7547 | [-0.6990%, 0.3343%] | 1.0333 | [-0.5491%, 0.3028%] | 0.8519 |
| 1998 | -0.0167% | [-0.0222%, -0.0136%] | 0.0085 | [-0.4554%, 0.2681%] | 0.7235 | [-0.7343%, 0.3184%] | 1.0527 | [-0.6566%, 0.2677%] | 0.9243 |
| 1999 | 0.0356% | [0.0269%, 0.0527%] | 0.0259 | [-0.2588%, 0.3785%] | 0.6373 | [-0.3693%, 0.5478%] | 0.9171 | [-0.3134%, 0.4330%] | 0.7464 |
| 2000 | 0.2878% | [0.2157%, 0.3904%] | 0.1746 | [-0.0101%, 0.6765%] | 0.6866 | [-0.0134%, 1.2236%] | 1.2370 | [0.0482%, 1.3414%] | 1.2931 |
| 2001 | 0.3279% | [0.2495%, 0.4957%] | 0.2462 | [-0.1123%, 0.9508%] | 1.0631 | [-0.1266%, 1.3981%] | 1.5247 | [-0.0531%, 1.4072%] | 1.4602 |
| 2002 | 0.4983% | [0.3707%, 0.7036%] | 0.3330 | [0.1718%, 1.3201%] | 1.1483 | [0.1466%, 2.6057%] | 2.4591 | [0.1747%, 2.4015%] | 2.2268 |
| 2003 | 0.7525% | [0.5557%, 1.0513%] | 0.4956 | [0.1644%, 1.7747%] | 1.6103 | [0.1530%, 3.0578%] | 2.9048 | [0.2678%, 2.8774%] | 2.6096 |
| 2004 | 1.0041% | [0.7459%, 1.5462%] | 0.8003 | [0.5070%, 2.4695%] | 1.9625 | [0.4644%, 4.8725%] | 4.4082 | [0.4834%, 4.7639%] | 4.2805 |
| 2005 | 1.0644% | [0.8265%, 1.5850%] | 0.7585 | [0.4932%, 2.5003%] | 2.0071 | [0.4062%, 4.8524%] | 4.4462 | [0.5260%, 4.0936%] | 3.5676 |
| 2006 | 1.0942% | [0.8326%, 1.6061%] | 0.7735 | [0.6526%, 2.6778%] | 2.0252 | [0.5540%, 5.4766%] | 4.9227 | [0.6408%, 5.1342%] | 4.4935 |
| 2007 | 1.0392% | [0.8163%, 1.4880%] | 0.6717 | [0.4520%, 2.5455%] | 2.0935 | [0.4103%, 4.7333%] | 4.3230 | [0.5311%, 4.3399%] | 3.8088 |
| 2008 | 0.9388% | [0.7448%, 1.3394%] | 0.5946 | [0.3513%, 2.1695%] | 1.8182 | [0.2970%, 3.5479%] | 3.2510 | [0.4646%, 4.7164%] | 4.2518 |
| 2009 | 0.6483% | [0.4836%, 0.9024%] | 0.4187 | [0.2595%, 1.6943%] | 1.4348 | [0.2170%, 3.1833%] | 2.9663 | [0.3354%, 2.6198%] | 2.2843 |
| 2010 | 0.8372% | [0.6528%, 1.2269%] | 0.5741 | [0.4688%, 2.0673%] | 1.5985 | [0.4062%, 4.1488%] | 3.7425 | [0.4621%, 3.5828%] | 3.1207 |
| 2011 | 0.8611% | [0.6425%, 1.2523%] | 0.6098 | [0.5239%, 1.9737%] | 1.4498 | [0.4375%, 3.7240%] | 3.2865 | [0.5173%, 3.0930%] | 2.5757 |
Note: All interval widths are measured in percentage points. Baseline results reflect 974 converged draws for measurement error alone and 973 for the two-step procedure; Winsorizing measurement-error variance at truncates 5,984 of 22,032 observations, equal to of the panel.
Table 6 forcefully confirms that baseline trade-data error dominates parameter uncertainty throughout the entire 16-year horizon. In 2011, China's point welfare gain of carries a parameter estimation interval of [0.6425%, 1.2523%] spanning percentage points, whereas data measurement error alone widens the interval to [0.5239%, 1.9737%] spanning percentage points— times as wide. Nonlinear interaction between data error and parameter estimation expands the baseline two-step interval to [0.4375%, 3.7240%], a span of percentage points or times conventional parameter uncertainty, peaking at percentage points in 2006. Moreover, across every pre-WTO year from 1996 through 2001, the combined interval straddles zero, nullifying early positive welfare claims. Crucially, however, our winsorization audit demonstrates heavy sensitivity to variance capping: imposing an upper cap of alters of the entire panel, raises the mean Empirical Bayes weight from to , and compresses the 2011 combined credible interval from to percentage points, a reduction in reported risk.

Note: Figure 3 plots 1996–2011 China welfare trajectories and compares credible bands across estimation error, measurement error, baseline two-step combination, and winsorization.
In the spatial transport infrastructure application of Allen and Arkolakis (2022), model over origin-destination pairs verifies an exceptionally tight highway gravity elasticity of with HC1 standard error , , and , alongside standardized residuals centered at with unit standard deviation . Table 7 presents the resulting top-three link return-on-investment distributions and pairwise rank-reversal tests estimated in from valid two-step posterior draws.
| Highway ROI Metric | AA Baseline | Posterior Mean | Posterior SD | Posterior Median | 95% Credible Interval | Rank-Reversal Prob |
|---|---|---|---|---|---|---|
| Rank-1 Interstate Link | 10.43% | 11.0399% | 1.4198% | 10.9173% | [8.6939%, 14.1476%] | 0.00% |
| Rank-2 Interstate Link | 9.54% | 8.8749% | 0.9252% | 8.8048% | [7.3136%, 10.8314%] | 0.00% |
| Rank-3 Interstate Link | 7.31% | 7.5096% | 0.3783% | 7.5268% | [6.7766%, 8.1838%] | 0.00% |
| Rank-1 minus Rank-2 Gap | 0.89% | 2.1650% | 1.3649% | 1.9664% | [0.3849%, 5.3858%] | 0.00% |
| Rank-2 minus Rank-3 Gap | 2.23% | 1.3653% | 0.8918% | 1.2965% | [-0.0469%, 3.2747%] | 3.00% |
Note: Estimated across valid two-step posterior draws in , reproducing Tables 2 and 3 of Sanders (2026a). Rank-reversal probability equals the empirical share of draws where the pairwise difference is negative.
Even under a modest assumed traffic measurement-error variance of , Table 7 reveals meaningful ranking uncertainty for capital budgeting. While the top-ranked interstate link dominates the second-ranked corridor with zero rank-reversal probability and a strictly positive gap interval of [0.3849%, 5.3858%], the gap between the second- and third-ranked links shrinks from a baseline point spread to a posterior mean of with standard deviation . Its credible interval crosses zero at [-0.0469%, 3.2747%], yielding a posterior probability that the third-ranked corridor actually outperforms the second-ranked project.

Note: Figure 4 illustrates the posterior return-on-investment densities for the three highest-yielding interstate links and the rank-gap distributions evaluating project prioritization risk.
4. Economic Mechanisms and Policy Implications
Taken together, our tri-runtime verification and five diagnostic extensions illuminate a coherent set of economic mechanisms governing uncertainty in quantitative equilibrium models. First, nonlinear equilibrium mappings amplify baseline data noise into first-order welfare risk. Because exact hat algebra evaluates welfare changes through ratios of domestic expenditure shares , classical symmetric reporting error in log trade flows fails to wash out upon aggregation. Instead, Jensen's inequality and equilibrium price adjustments shift posterior medians away from plug-in point estimates while widening credible intervals well beyond conventional parameter uncertainty. As regression proves, this vulnerability concentrates in highly open economies where import shares magnify the welfare elasticity of every bilateral data perturbation.
Second, our discovery of the operator-precedence error in solve_Y_hat.m illustrates how macroeconomic trade imbalances transmit through multi-country market clearing. Under exogenous deficits in Dekle, Eaton, and Kortum (2007) and Dekle, Eaton, and Kortum (2008), exporter 's factor income depends on the expenditure-weighted demand of every destination market . Factoring outside the destination sum breaks Walrasian market clearing whenever countries run heterogeneous current-account balances. For small developing economies running sizable external deficits such as the Central African Republic, misplacing the deficit multiplier artificially inflates counterfactual nominal income and understates true welfare losses by nearly two-fifths. Cross-language numerical verification thus serves not merely as a bookkeeping exercise, but as an indispensable safeguard against silent algebraic misspecification in computational general equilibrium research.
Third, the interaction between gravity prior bias in , non-separable variance structure in , and heavy winsorization sensitivity in reveals a delicate trade-off inside Empirical Bayes regularization. Empirical Bayes improves mean-squared error only when the shrinkage target and variance weights reflect the true data-generating process. Dropping zero trade flows under log-OLS tilts the prior excessively against distant corridors, while additive two-way fixed-effects variance shrinkage understates measurement noise on thin long-haul routes where CIF–FOB valuation wedges and customs discrepancies peak. Similarly, capping variance at clips more than a quarter of the sample in the China trade application, risking overconfident policy bands right where statistical noise is most severe.
5. Conclusion
This independent reproducibility study has thoroughly verified Sanders (2026a) using Tier-1 Harvard Dataverse data (Sanders, 2026b) across twelve harmonized econometric and general-equilibrium models – executed in Python, R, and StataNow 19.5 MP. All twelve specifications achieve near-exact cross-engine convergence with a peak deviation of , confirming the original paper's foundational thesis that measurement error in baseline economic data generates counterfactual uncertainty vastly exceeding conventional parameter estimation error.
At the same time, our independent algorithmic and econometric audit delivers five material scientific corrections and qualifications. Most prominently, correcting the left-to-right MATLAB operator-precedence bug on line 14 of solve_Y_hat.m and tightening fixed-point convergence to shifts the Central African Republic's Armington welfare loss upward by and raises the 76-country average loss by . Complementary diagnostics establish a distance-elasticity distortion between log-OLS and PPML gravity priors, decisively reject additive exporter-plus-importer variance separability, and document a interval compression caused by truncating of mirror-trade variances under the winsorization rule. Together, these findings refine both the empirical benchmark and the methodological roadmap for credible uncertainty quantification in quantitative international economics.
References
Adao, R., Costinot, A., & Donaldson, D. (2017). Nonparametric counterfactual predictions in neoclassical models of international trade. American Economic Review, 107, 633–689. https://doi.org/10.1257/aer.20150956 ↩
Allen, T., & Arkolakis, C. (2022). The welfare effects of transportation infrastructure improvements. The Review of Economic Studies, 89, 2911–2957. https://doi.org/10.1093/restud/rdac001
Anderson, J. E., & van Wincoop, E. (2003). Gravity with gravitas: A solution to the border puzzle. American Economic Review, 93, 170–192. https://doi.org/10.1257/000282803321455214
Arkolakis, C., Costinot, A., & Rodriguez-Clare, A. (2012). New trade models, same old gains? American Economic Review, 102, 94–130. https://doi.org/10.1257/aer.102.1.94 ↩
Cameron, A. C., & Miller, D. L. (2015). A practitioner's guide to cluster-robust inference. Journal of Human Resources, 50, 317–372. https://doi.org/10.3368/jhr.50.2.317
Correia, S., Guimaraes, P., & Zylkin, T. (2020). Fast Poisson estimation with high-dimensional fixed effects. The Stata Journal, 20, 95–115. https://doi.org/10.1177/1536867X20909691 ↩
Costinot, A., & Rodriguez-Clare, A. (2014). Trade theory with numbers: Quantifying the consequences of globalization. In G. Gopinath, E. Helpman, & K. Rogoff, Handbook of International Economics. Elsevier. https://doi.org/10.1016/B978-0-444-54314-1.00004-5
Dekle, R., Eaton, J., & Kortum, S. (2007). Unbalanced trade. American Economic Review, 97, 351–355. https://doi.org/10.1257/aer.97.2.351 ↩
Dekle, R., Eaton, J., & Kortum, S. (2008). Global rebalancing with gravity: Measuring the burden of adjustment. IMF Staff Papers, 55, 511–540. https://doi.org/10.1057/imfsp.2008.17 ↩
Efron, B., & Morris, C. (1973). Stein's estimation rule and its competitors—An empirical Bayes approach. Journal of the American Statistical Association, 68, 117–130. https://doi.org/10.1080/01621459.1973.10481350
Head, K., & Mayer, T. (2014). Gravity equations: Workhorse, toolkit, and cookbook. In G. Gopinath, E. Helpman, & K. Rogoff, Handbook of International Economics. Elsevier. https://doi.org/10.1016/B978-0-444-54314-1.00003-3 ↩
Linsi, L., Burgoon, B., & Mugge, D. K. (2023). The problem with trade measurement in international relations. International Studies Quarterly, 67, sqad020. https://doi.org/10.1093/isq/sqad020 ↩
Redding, S. J., & Rossi-Hansberg, E. (2017). Quantitative spatial economics. Annual Review of Economics, 9, 21–58. https://doi.org/10.1146/annurev-economics-063016-103713
Sanders, B. (2026a). Measurement error and counterfactuals in quantitative trade and spatial models. The Review of Economics and Statistics, 1–42. https://doi.org/10.1162/rest.a.1785 ↩
Sanders, B. (2026b). Replication Data for: Measurement Error and Counterfactuals in Quantitative Trade and Spatial Models. Harvard Dataverse, V1. https://doi.org/10.7910/DVN/L3SQTO ↩
Silva, J. M. C. S., & Tenreyro, S. (2006). The log of gravity. The Review of Economics and Statistics, 88, 641–658. https://doi.org/10.1162/rest.88.4.641 ↩
Appendix A. Independent Academic Peer-Review Report
A.1. Overall Assessment of Scholarly Contribution and Research Positioning
Sanders (2026a) tackles a foundational blind spot that has persisted across quantitative international trade and spatial economics since the widespread adoption of exact hat-algebra counterfactuals (Dekle, Eaton, & Kortum, 2007; Dekle, Eaton, & Kortum, 2008; Arkolakis, Costinot, & Rodriguez-Clare, 2012). For nearly two decades, empirical practitioners publishing in American Economic Review, Econometrica, The Review of Economic Studies, and The Review of Economics and Statistics have devoted intense attention to identifying structural elasticities such as the trade elasticity and reporting standard errors reflecting parameter estimation uncertainty, while treating the baseline bilateral trade matrix, domestic absorption vector, and spatial transport counts as deterministic constants. Yet official international trade records suffer from severe bilateral reporting discrepancies documented by Linsi, Burgoon, and Mugge (2023), raising the immediate question of whether plug-in general-equilibrium counterfactuals convey illusory precision.
The manuscript's primary intellectual achievement is converting this conceptual critique into a general, operational, and mathematically transparent Empirical Bayes methodology rooted in Efron and Morris (1973). By utilizing mirror trade reports from importing and exporting customs agencies to identify bilateral measurement-error variances, marrying those estimates with a structural gravity prior, and drawing posterior realizations of the latent baseline economy, Sanders (2026a) provides two modular inference algorithms: a one-step procedure isolating baseline data error and a two-step procedure compounding baseline data error with structural parameter estimation uncertainty. Demonstrating this framework across three canonical settings—a 76-country Armington model, the nonparametric China trade shock of Adao, Costinot, and Donaldson (2017), and the U.S. Interstate Highway System analysis of Allen and Arkolakis (2022)—establishes broad relevance across both international trade and quantitative spatial economics.
Substantively, the headline findings are genuinely field-shaping and fully justify publication in a top general-interest econometrics and applied economics outlet. Showing that measurement error in 2011 China trade data yields a credible interval times wider than parameter estimation error alone—and times wider once nonlinear two-step interactions are included—fundamentally alters how economists should interpret structural welfare estimates. Equally compelling is the demonstration in the Armington application that plug-in counterfactual point estimates for the Central African Republic at and the Netherlands at lie completely outside their posterior credible intervals, proving that nonlinear equilibrium propagation turns baseline measurement noise into systematic point-estimate bias rather than harmless symmetric dispersion.
Nevertheless, rigorous independent inspection of the archived code, data pipelines, and numerical equilibria reveals nontrivial implementation defects and econometric specification vulnerabilities that qualify the paper's published numbers. Most consequentially, line 14 of solve_Y_hat.m contains a genuine MATLAB operator-precedence bug compounded by a loose stopping tolerance that violates exact Dekle–Eaton–Kortum market clearing and understates the Central African Republic's baseline welfare loss by . Alongside this coding error, estimating the Empirical Bayes prior by log-linear OLS rather than PPML induces a distance-elasticity distortion, additive two-way fixed-effects variance shrinkage is decisively rejected by the bilateral data, and the winsorization check clips of observations in the China application. While these issues leave the author's conceptual insight intact, they necessitate transparent correction and methodological strengthening before the numerical benchmarks are adopted for policy analysis.
A.2. Critical Appraisal of Causal Identification Strategy and Econometric Assumptions
Unlike reduced-form causal designs focused on a single treatment parameter, the identification problem in Sanders (2026a) is semiparametric recovery of the joint posterior distribution of a latent baseline economy from noisy mirror records and , followed by deterministic or two-step propagation through a structural counterfactual mapping . Credible inference therefore rests on four stringent econometric assumptions: classical symmetric independent mirror-trade reporting errors; Proper specification of the structural gravity prior and zero-flow generating process; Separable exporter-plus-importer variance shrinkage; And algebraic exactness of the general-equilibrium counterfactual operator .
The first pillar assumes and with , equal bilateral variances , and zero cross-partner covariance . Every one of these three conditions faces serious empirical strain in customs data.
First, import values are systematically recorded on a CIF basis inclusive of international freight and insurance charges, whereas exports are recorded FOB at the departing border. Consequently, , typically ranging between and on long-haul maritime routes. Plugging raw uncentered log differences into the mean-squared discrepancy formula conflates deterministic transport costs with random reporting noise, inflating estimated measurement-error variance on distant corridors.
Second, symmetry across reporters is implausible when pairing an advanced economy equipped with automated customs clearance against a low-income country with weak statistical capacity; Splitting the combined discrepancy equally assigns half of the weaker reporter's error variance to the stronger statistical agency.
Third, entrepot re-export hubs such as the Netherlands generate correlated misattribution of final origin and destination across both partner records, violating and biasing variance estimates downward precisely on transit-heavy routes.
The second pillar concerns estimation of the Empirical Bayes prior mean via two-way fixed-effects log-OLS on positive trade flows in . As established by Silva and Tenreyro (2006) and synthesized by Head and Mayer (2014), taking logarithms of a multiplicative gravity model under heteroskedastic disturbances violates conditional mean independence through Jensen's inequality while truncating all zero-trade pairs. Our tri-runtime comparison between on positive pairs and using PPML on all non-Belgium pairs quantifies a massive discrepancy: the distance elasticity shrinks in magnitude from to , a bias. Because the Empirical Bayes posterior shrinks noisy flows toward and imputes spurious zeros from , using a log-OLS prior systematically rotates the imputed baseline trade matrix toward short-distance partners and away from long-distance corridors.
The third pillar imposes additive separability in two-way Poisson fixed-effects shrinkage of measurement-error variance, . While verifies that this procedure preserves the grand mean of and cuts cross-pair dispersion by , its is merely . Our formal separability test on pairs shows that even after absorbing all exporter and importer fixed effects, bilateral log trade volume strongly reduces measurement-error variance with coefficient and , while bilateral log distance strongly increases it with coefficient and , lifting to . These partial elasticities are directly consistent with both law-of-large-numbers variance reduction on thick trade corridors and distance-increasing CIF–FOB valuation discrepancies.
The fourth pillar requires exact implementation of the equilibrium counterfactual operator and proper accounting for measurement-error contamination during parameter estimation. In the Armington model, the operator-precedence error in solve_Y_hat.m alters the counterfactual operator itself, distorting baseline equilibria across every country with non-zero trade deficits. Moreover, in the two-step algorithm applied to Adao, Costinot, and Donaldson (2017) and Allen and Arkolakis (2022), conditioning parameter draws on noisy baseline data assumes that any instrument-side measurement error in the first-stage structural estimator is already captured in the asymptotic variance matrix; When bilateral trade-share instruments contain serially correlated reporting errors, the resulting two-step credible intervals remain conservative lower bounds on total uncertainty.
A.3. Assessment of Data Quality, Variable Measurement, and Sample Sensitivity
Inspection of the Tier-1 Harvard Dataverse archive (Sanders, 2026b) confirms commendable transparency under a CC0 1.0 open license, yet surfaces four concrete data-hygiene, measurement, and sample-sensitivity concerns that directly affect reproducibility and empirical robustness.
First, sample alignment and silent country exclusion create fragile reproducibility hazards in the Armington pipeline. Whereas countries.csv, bilateral_1996.xls, and the archived posterior draw file index the 77 economies with the United States at index 1 followed by the remaining 76 nations alphabetically, the R script Mirror_trade_Armington.R orders all countries strictly alphabetically, placing Argentina at index 1 and the United States at index 71. Executing the R script verbatim and feeding its output into Master_code.m without an explicit index re-mapping misaligns international trade flows against WIOD domestic absorption diagonals.
Simultaneously, Belgium exhibits zero bilateral flows across all 76 partners in 1996 because historical customs records pooled the Belgium–Luxembourg Economic Union; Silently dropping Belgium shrinks the world economy from 77 to 76 nations. Given Belgium's central role in Western European maritime trade and its dense integration with the Netherlands—one of the paper's four headline countries—omitting Belgium rather than harmonizing a combined Belgium–Luxembourg entity alters regional trade shares and multilateral resistance terms.
Second, temporal pooling and asymmetric treatment of domestic absorption introduce subtle measurement distortions. The Armington application pools 21 years of mirror-trade records from 1986 through 2006 to compute pair-level error variances and zero-flow probabilities, assuming stationarity across a two-decade window marked by the global transition from SITC to Harmonized System customs classifications and widespread electronic border modernization. Averaging across twenty-one years masks secular declines in reporting noise and blurs cross-sectional precision specific to 1996. Equally consequential, diagonal domestic absorption entries drawn from WIOD 1996 are treated as noiseless with . Because domestic absorption is constructed residually as gross output minus total exports, national-accounts measurement error in gross output—especially pervasive in developing economies with large informal sectors—directly contaminates domestic expenditure shares .
Third, the Adao, Costinot, and Donaldson (2017) counterfactual exhibits severe sensitivity to tail truncation and selective solver non-convergence. Across the 22,032-observation panel spanning 1995–2011, raw measurement-error variance is heavily right-skewed; Consequently, imposing the paper's winsorization cap at alters 5,984 observations—an extraordinary of the entire dataset. Rather than trimming isolated outliers, capping more than one-quarter of the panel lifts the average Empirical Bayes weight from to and shrinks the 2011 combined credible interval for China from to percentage points, a contraction.
Furthermore, in the baseline uncapped output matrix C1_B1000.mat, solver failures eliminate 26 draws in the measurement-error run and 27 draws in the two-step run, leaving 974 and 973 valid replications compared with 999 and 995 under winsorization. Because nonlinear GMM and equilibrium non-convergence concentrates disproportionately among extreme-variance draws, discarding of realizations induces selective convergence truncation that slightly compresses upper-tail uncertainty.
Fourth, standalone end-to-end replication of the two secondary applications remains constrained by external file dependencies and minor output-file hygiene flaws. Re-running the raw GMM elasticity estimation in Adao, Costinot, and Donaldson (2017) or the GIS network preprocessing in Allen and Arkolakis (2022) requires downloading proprietary or separately hosted replication packages from those earlier articles, even though Sanders (2026b) provides all intermediate Empirical Bayes inputs and posterior draw outputs needed to verify published tables and figures. Additionally, AA_2022/Output/me_two_step.csv appends five unlabeled summary and blank rows immediately below draw 1,000, requiring explicit row-count filtering to prevent automated parsers from corrupting posterior mean and variance calculations.
A.4. Core Methodological Limitations of the Original Study
- MATLAB Left-to-Right Operator-Precedence Bug and Coarse Stopping Tolerance Distorting Armington General Equilibria: On line 14 of
solve_Y_hat.m, omitting parentheses around destination expenditure causes MATLAB's equal-precedence matrix and elementwise multiplication operators to evaluate left to right, replacing the exact Dekle–Eaton–Kortum market-clearing identity with the misspecified recursion . Compounded by a loose stopping threshold of that halts iteration after 8 steps rather than 75 steps at , this algebraic error breaks structural equilibrium consistency and induces systematic directional bias governed to first order by cross-country heterogeneity between own trade deficit and export-weighted partner deficits , such that . For trade-deficit developing countries where , the bug artificially inflates counterfactual income , dampens domestic expenditure share increases, and severely understates real welfare losses—biasing the Central African Republic's reported loss upward toward zero by from a true equilibrium of to and understating the 76-country average welfare loss by from to . Conversely, trade-surplus economies such as Sweden suffer an opposite-sign exaggeration of welfare losses by , with the single largest country-level discrepancy reaching percentage points. - Sample-Selection and Jensen's Inequality Bias from Log-Linear OLS Gravity Priors: Estimating the Empirical Bayes prior mean via log-OLS in discards zero-trade corridors out of pairs and violates consistency under multiplicative heteroskedasticity (Silva & Tenreyro, 2006). Formally, under where error variance increases with distance and falls with trade scale, the log-transformed conditional expectation correlates negatively with , inducing strong downward asymptotic bias . Empirically, yields versus in , an upward magnitude distortion of . Because spurious zeros are imputed via and noisy corridors shrink toward , this negative slope bias systematically underpredicts long-distance bilateral trade and overpredicts regional trade, imparting directional bias to posterior trade openness and welfare counterfactuals for geographically remote economies.
- Misspecification of Additive Two-Way Fixed-Effects Variance Shrinkage Due to Omitted Bilateral Scale and Distance Effects: Shrinking raw mirror-trade variances through in explains only of variance heterogeneity and omits key bilateral covariates. Model on corridors decisively rejects additive separability, uncovering strong omitted-variable elasticities on log trade flow at with and log geographic distance at with . Within the conjugate Empirical Bayes weight , this misspecification generates systematic two-sided bias: on high-volume short-distance routes, additive shrinkage overstates , biasing downward and inflating posterior variance ; On thin long-distance corridors, it understates , biasing upward and generating artificially tight credible bands precisely where customs reporting is least reliable.
- CIF–FOB Valuation Asymmetry and Zero-Error Assumption on Domestic Absorption: Equating half the mean-squared mirror discrepancy to pure random measurement-error variance assumes zero mean reporting wedge, while fixing assumes error-free domestic absorption. Whenever positive CIF–FOB freight and insurance wedges exist, the variance estimator suffers deterministic positive bias , systematically exaggerating random measurement noise in proportion to squared transport margins. Conversely, suppressing national-accounts measurement error on diagonal domestic absorption eliminates denominator uncertainty in domestic expenditure shares , biasing posterior welfare variance downward—particularly for large internally oriented economies and developing nations with substantial informal production.
- Hyperparameter Sensitivity to Variance Winsorization, Selective Solver Attrition, and Homoskedastic Traffic-Noise Calibration: Truncating mirror-trade variances at in the Adao, Costinot, and Donaldson (2017) application affects of observations, inflating average Empirical Bayes weights and inducing a downward bias in the 2011 combined credible interval width. Even without winsorization, nonlinear solver attrition in the baseline draws selectively censors extreme-noise realizations, biasing upper-tail welfare intervals downward. Analogously, imposing an exogenous homoskedastic variance of across all highway pairs in the Allen and Arkolakis (2022) application ignores sharp heteroskedasticity between sensor-dense metropolitan interstates and sparsely monitored rural corridors, rendering the estimated rank-reversal probability between the second- and third-ranked links sensitive to unverified variance-homogeneity assumptions.
A.5. Recommendations for Model Upgrades and International Publication Extensions
- Publish a Corrected Dekle–Eaton–Kortum Armington Solver and Full Re-Sampled Posterior Distribution: The most immediate and high-value technical upgrade is correcting line 14 of
solve_Y_hat.mto enclose destination expenditure inside the market-clearing summation, tightening convergence tolerance to , enforcing explicit Walrasian normalization diagnostics, and harmonizing Belgium–Luxembourg rather than silently dropping Belgium. Re-executing the full Empirical Bayes Monte Carlo ensemble under the corrected equilibrium solver will establish an authoritative benchmark replacing the -distorted Central African Republic point estimate and offers a compelling basis for a formal comment or corrigendum in The Review of Economics and Statistics or Journal of International Economics. - Adopt Two-Part PPML Gravity Priors and Covariate-Augmented Hierarchical Variance Shrinkage: To eliminate the log-OLS prior distortion documented in alongside the variance separability rejection in , future implementations should replace the two-way OLS gravity prior with high-dimensional fixed-effects PPML estimation following Correia, Guimaraes, and Zylkin (2020) combined with an explicit extensive-margin selection equation for zero trade flows. Simultaneously, measurement-error variance shrinkage should be upgraded from additive two-way Poisson fixed effects to a hierarchical Gamma or log-linear variance model conditioning on predicted trade volume, geographic distance, and commodity-specific CIF–FOB transport margins, thereby isolating deterministic freight costs from pure stochastic reporting error.
- Incorporate Diagonal Domestic-Absorption Noise and Asymmetric Partner-Specific Error Variances: A major econometric advance suitable for Journal of Econometrics or Quantitative Economics lies in relaxing both reporting symmetry and error-free domestic absorption. By exploiting historical national-accounts revision vintages across multi-region input-output tables such as WIOD or OECD ICIO to identify diagonal variance , and specifying an asymmetric factor structure separating exporter variance from importer variance identified through overlapping partner networks, researchers can capture full numerator and denominator uncertainty in without misattributing developing-country customs noise to statistically rigorous trading partners.
- Replace Ad Hoc Variance Winsorization with Heavy-Tailed Student-t Priors and Homotopy-Stabilized Solvers: Rather than relying on an arbitrary cap that truncates of the Adao, Costinot, and Donaldson (2017) panel, international Q1 publication standards call for continuous hyperparameter sensitivity curves across trimming quantiles from to paired with heavy-tailed Student- hierarchical variance models that smoothly downweight extreme discrepancies without hard truncation. Coupling this statistical upgrade with multi-start or homotopy-continuation nonlinear GMM solvers will drive the solver attrition rate to zero, removing selective convergence bias from upper-tail welfare intervals.
- Estimate Empirical Traffic-Error Variances and Apply Corrected Uncertainty Quantification to 2018–2025 Trade Fragmentation: Within quantitative spatial economics, replacing the assumed homoskedastic traffic variance in Allen and Arkolakis (2022) with empirically calibrated corridor-level variances derived by cross-matching Federal Highway Administration permanent traffic recorders against commercial freight GPS telemetry will produce genuinely data-driven infrastructure prioritization risk bounds. In international trade policy, deploying the corrected Dekle–Eaton–Kortum solver with PPML Empirical Bayes priors on 2018–2025 bilateral trade panels offers an urgent, publishable framework for American Economic Journal: Economic Policy to assess whether projected welfare losses from reciprocal tariff escalations and global supply-chain decoupling remain statistically distinguishable across alternative policy scenarios once baseline customs measurement error is properly propagated.
sanders_2026_trade_merecord_typeyearexpimpexp_idximp_idxin_sampleis_diagflow_mainflow_mirrorflow_altflow_alt_mirrorUnlock Replication Data & Code
Having explored the quantitative findings and methodological critique above, sign in with an active membership or join the EcoLab research community to verify every estimated coefficient independently in your own analytical environment.
Aligned with Study Variable Names, Robust Covariance Specifications, and Diagnostic Checks
Ready for Immediate Execution in Your Local Statistical Environment for Independent Verification
Bundled with Journal-Formatted DOCX & PDF Manuscripts, Empirical CSV Dataset, All Three R · Stata · Python Scripts, and Execution Notes
Every Download Link Is Cryptographically Signed for Active Members and Refreshes Seamlessly on the Article Page




