Skip to content

NittanyLion/Grumps.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Grumps.jl

Stable Dev Aqua QA

header

Grumps.jl v0.2.5

Overview

Grumps.jl is a package for computing random coefficients demand models using consumer and product level data. The main estimators are introduced in Grieco, Murry, Pinkse, and Sagl (2022), including:

  1. the conformant likelihood with exogeneity restrictions (CLER) estimator

  2. an asymptotically equivalent less expensive alternative thereof

  3. the mixed data likelihood estimator (MDLE)

  4. the share constrained likelihood estimator

    In addition, other estimators have been implemented:

  5. mixed logit models (consumer level data only)

  6. multinomial logit models (consumer level data only)

  7. GMM type random coefficient models in the style of Berry, Levinsohn, and Pakes (2004) (in process, not recommended)

$(\hat\delta,\hat\theta,\hat\beta) = \text{argmin}_{\delta,\theta,\beta} \big( - \log \hat L(\delta,\theta) + \hat\Pi(\delta,\beta) \big),$

where $\log \hat L$ is the sum of a micro loglikelihood and a macro loglikelihood and $\hat\Pi$ is a quadratic penalty term. Any of the three components can be omitted if so desired.

Typically, $\log \hat L$ is a sum over markets, products, and consumers whereas $\hat\Pi$ is a GMM-style squared norm of a vector-valued sum over markets. Please see Grieco, Murry, Pinkse, and Sagl (2022) for details.

Several extensions are possible, which may require additions to the code.

Documentation

This documentation describes the use of the Grumps computer package. It does not describe the estimators or algorithms. Please refer to Grieco, Murry, Pinkse, and Sagl (2022) for that. In addition, the code itself is documented, also.

Limitations

This is still a preliminary version of Grumps, so please advise Joris Pinkse of any bugs, problems, shortcomings, missing features, etcetera. Features it does not currently possess include:

  1. sparse quadrature or similar integration methods
  2. distributed computing
  3. GPUs
  4. statistics other than coefficients, e.g. elasticities
  5. integration methods for the micro portion of the GMM estimator other than quadrature
  6. traditional GMM; see Grieco, Murry, Pinkse, and Sagl (2022) for details
  7. standard errors for some of the estimators
  8. detailed sanity checks

Versions

0.2.4

  1. Bug fix for the user-specified arbitrary interactions case.

0.2.3

  1. Bug fix for the case in which there are no macro data but an estimator other than mixed logit is selected.

0.2.2

  1. Added compatibility checks
  2. Precautionary change to improve robustness across operating systems

0.2.1

One minor bug fix:

  1. Mac terminals did not support the progress bar in version 0.2.0. This issue has been addressed and the progress bar is moreover turned off by default.

0.2.0

There are many improvements, including:

  1. User-specified interactions, which makes it possible to e.g. have distance between consumer and branch as an interactions regressor
  2. Significant improvement in speed
  3. A progress bar, indicating what fraction of markets have been completed in an iteration
  4. Several other code improvements

License

All of this code is subject to the MIT license. This code includes a modified version of the Newton Method with Trust Regions code in the Optim package, which is also subject to the MIT license.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages