Gravity Portal: Computer Code

Models Overview

We have created several tools to facilitate gravity analysis. Our GME package includes the computer code to do gravity analysis. The Gravity in Diagrams guide presents a simple explanation of the gravity model.

Computer Code

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 May 2019, the GME package has been downloaded over 1,700 times.

The GME package is an open-source project. We invite everyone to contribute to it via the project's GitHub account.

Gravity in Diagrams

A simple diagrammatical explanation of the gravity model is presented here