Transportation Methods for Econometrics

TraME Build Coverage Status

Watch Star Fork


TraME (Transportation Methods for Econometrics) is a templated C++ library for solving problems of equilibrium computation and estimation in consumer demand and matching frameworks via the Mass Transportation Approach.


Features
 
  • Several popular random utility specifications, as well as models with transferable, non-transferable, and imperfectly transferable utility
  • Numerous equilibrium solvers, including the iterative proportional fitting procedure (IPFP) and the deferred acceptance algorithm
  • Maximum likelihood- and moment matching-based estimation

Authors:

License


Download and Installation

  • The source code is available on GitHub.
  • To use the linear programming features TraME requires an installation of Gurobi or GLPK.

The library can be installed on Unix-alike systems via the standard ./configure && make method:

# clone TraME into the current directory
git clone https://github.com/TraME-Project/TraME ./trame
# build and install
cd ./trame
./configure -i "/usr/local" -p
make
make install

The last line will install TraME to /usr/local.

Configuration options: (see ./configure -h)

    Primary
  • -h print help
  • -i install path; default: the build directory
  • -l specify a linear programming library to use;
            for example -l glpk or -l gurobi
  • -m specify the BLAS and Lapack libraries to link against;
            examples: -m "-lopenblas" or -m "-framework Accelerate"
  • -o compiler optimization options;
            default: -O3 -march=native -ffp-contract=fast -flto -DARMA_NO_DEBUG
  • -p enable OpenMP parallelization features (recommended)
  • Secondary
  • -c a coverage build (used with Codecov)
  • -d a 'development' build
  • -g a debugging build (optimization flags set to -O0 -g)

Armadillo

TraME is built on the Armadillo C++ linear algebra library. The configure script will search for Armadillo files in the usual places: /usr/include, /usr/local/include, /opt/include, /opt/local/include. If the Armadillo header files are installed elsewhere, set the following environment variable before running configure:
export ARMA_INCLUDE_PATH=/path/to/armadillo
Otherwise the build script will download the required files from the Armadillo GitLab repository.