We have created the tools to facilitate gravity analysis. Our GME Python package includes the computer code to do gravity analysis. The Gravity in Diagrams guide presents an intuitive explanation of the gravity model.
Click here to see the documentation for the GME package, including the installation instructions.
The GME package for Python includes the computer code that forms part of the USITC’s Gravity Modeling Environment (GME).
The package consists of tools to aid in the fast, flexible, and robust estimation of gravity models using modern, best practices. It offers several distinct advantages over alternative software choices for conducting gravity analysis. First, the package is written in Python, a flexible, powerful, and free programming language that can be readily used on a wide variety of computers with no cost. Second, unlike more general statistical software, which must cater to a broad number of needs, the GME package has been specifically designed to perform gravity analysis well. Third, because the tools are implemented in Python, users have access to an enormous and growing collection of third-party tools to incorporate into and expand their work.
In the current release, the GME package performs Poisson Pseudo-Maximum Likelihood (PPML) estimation at the industry level, including all the necessary diagnostics. The package also includes a set of tools for producing summary statistics and other types of commonly sought descriptive information. The package can save and load estimation results in full or using a space-saving slim results option.
As of January 2023, the GME package has been downloaded over 8,000 times.
The GME package is an open-source project. We invite everyone to contribute to it via the project's GitHub account.