Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Huff Model in Stata

From   "Dimitriy V. Masterov" <>
To   Statalist <>
Subject   st: Huff Model in Stata
Date   Wed, 30 Nov 2011 16:50:39 -0500

The Huff Model is a spatial interaction model that calculates
gravity-based probabilities of consumers at each origin location
patronizing each store in the store dataset. The outcome variable
p_{ij} is the probability that consumers located at site i will choose
to shop at store j is given by the following formula:

p_{ij}=\frac{a_{j}^{\alpha }d_{ij}^{-\beta }\varepsilon _{ij}}{%
\sum_{i=1}^{n}a_{j}^{\alpha }d_{ij}^{-\beta }\varepsilon _{ij}}

a_{j} is a measure of attractiveness of store j, such as square footage
d_{ij} is the driving distance from customers in area i to store j
\varepsilon_{ij} is the error term.
\alpha is an attractiveness parameter to be estimated
\beta is the distance decay parameter to be estimated
n is the total number of stores near customers in area i, which varies by i

If the TeX notation is confusing, the model is described here (without
the error term):

I have two related questions.

First, I only observe revenue and the number of orders, so that I
can't estimate p_{ij} with the proportion of consumers who purchased
the product in area i. I could make the outcome variable binary
(purchased or not), but I think that may not be quite correct.

Second, once I can redefine the outcome in a suitable way, is there a
way to estimate this model in Stata? There's at least a couple ways to
estimate \alpha and \beta using OLS by taking logs and normalizing by
the geometric means (described in this gated paper or this ungated one,,
but I am not sure how to do that with a binary outcome variable.

Any advice would be greatly appreciated.

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index