Skip to content

Commit

Permalink
DOC: be more explicit about what random coefficient distributions are…
Browse files Browse the repository at this point in the history
… supported
  • Loading branch information
jeffgortmaker committed Oct 28, 2022
1 parent b16345a commit ac758f9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/background.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The agent-specific portion of utility in a single market is, in vector-matrix fo

The model incorporates both observable (demographics) and unobservable taste heterogeneity though random coefficients. For the unobserved heterogeneity, we let :math:`\nu` denote independent draws from the standard normal distribution. These are scaled by a :math:`K_2 \times K_2` lower-triangular matrix :math:`\Sigma`, which denotes the Cholesky root of the covariance matrix for unobserved taste heterogeneity. The :math:`K_2 \times D` matrix :math:`\Pi` measures how agent tastes vary with demographics.

In the above expression, random coefficients are assumed to be normally distributed. To incorporate one or more lognormal random coefficients, the associated columns in the parenthesized expression can be exponentiated before being pre-multiplied by :math:`X_2`. For example, this allows for the coefficient on price to be lognormal so that demand slopes down for all agents. For lognormal random coefficients, a constant column is typically included in :math:`d` so that its coefficients in :math:`\Pi` parametrize the means of the logs of the random coefficients.
In the above expression, random coefficients are assumed to be normally distributed, but this expression supports all elliptical distributions. To incorporate one or more lognormal random coefficients, the associated columns in the parenthesized expression can be exponentiated before being pre-multiplied by :math:`X_2`. For example, this allows for the coefficient on price to be lognormal so that demand slopes down for all agents. For lognormal random coefficients, a constant column is typically included in :math:`d` so that its coefficients in :math:`\Pi` parametrize the means of the logs of the random coefficients. More generally, all log-elliptical distributions are supported. A logit link function is also supported.

Random idiosyncratic preferences, :math:`\epsilon_{ijt}`, are assumed to be Type I Extreme Value, so that conditional on the heterogeneous coefficients, market shares follow the well-known logit form. Aggregate market shares are obtained by integrating over the distribution of individual heterogeneity. They are approximated with Monte Carlo integration or quadrature rules defined by the :math:`I_t \times K_2` matrix of integration nodes, :math:`\nu`, and an :math:`I_t \times 1` vector of integration weights, :math:`w`:

Expand Down
6 changes: 4 additions & 2 deletions pyblp/economies/problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -1352,10 +1352,12 @@ class Problem(ProblemEconomy):
rc_types : `sequence of str, optional`
Random coefficient types:
- ``'linear'`` (default) - The random coefficient is as defined in :eq:`mu`.
- ``'linear'`` (default) - The random coefficient is as defined in :eq:`mu`. All elliptical distributions
are supported, including the normal distribution.
- ``'log'`` - The random coefficient's column in :eq:`mu` is exponentiated before being pre-multiplied by
:math:`X_2`. It will take on values bounded from below by zero.
:math:`X_2`. It will take on values bounded from below by zero. All log-elliptical distributions are
supported, including the lognormal distribution.
- ``'logit'`` - The random coefficient's column in :eq:`mu` is passed through the inverse logit function
before being pre-multiplied by :math:`X_2`. It will take on values bounded from below by zero and above by
Expand Down

0 comments on commit ac758f9

Please sign in to comment.