This is a project which is currently making use of HPC facilities at Newcastle University. It is active.
For further information about this project, please contact:
This study uses monthly product-level data on the United Kingdom’s exports to European Union to evaluate the net trade effects of Brexit. The empirical strategy relies on a Staggered Difference-in-Differences framework, allowing treatment to occur at different times across products affected by EU Non-tariff Measures (NTMs) changes. Data cleaning, variable standardization, and the construction of the panel dataset are conducted using Python, particularly through Pandas and NumPy for efficient handling of large HS (Harmonised System) 6-digit level datasets. The econometric estimation is carried out in Stata MP, where the Staggered Difference-in-Differences framework is used to obtain cohort-time treatment effects and event-study dynamics, supplemented by a range of robustness checks. For visualization, R’s ggplot2 package is employed to generate publication-quality figures that illustrate key trends and estimated treatment effects. Together, this multi-software workflow ensures comprehensive and rigorous analysis of Brexit’s net impact on UK–EU trade.
This study integrates multiple software environments to conduct data processing and econometric estimation. Python, using Pandas and NumPy, is employed for data cleaning, variable standardization, and the merging of large HS-6–level panel datasets. Econometric analysis is conducted in Stata MP, which allows efficient implementation of Staggered Difference-in-Differences using the Stata package (e.g. csdid), event-study, and a range of robustness checks, including alternative standard errors clustering and placebo tests. Stata MP also supports the production of summary statistics and regression tables. For high-quality visualization, R’s ggplot2 package is used to generate publication-ready trend plots, coefficient graphs, and other figures. Together, Python, Stata, and R constitute a coherent workflow for data preparation, estimation, and visualization.