Learn R Programming

REAT (version 1.2.1)

huff: Huff model

Description

Calculating market areas using the probabilistic market area model by Huff

Usage

huff(huffdataset, origins, locations, attrac, dist, gamma = 1, lambda = -2, atype = "pow", dtype = "pow", gamma2 = NULL, lambda2 = NULL, output = "shares", localmarket_dataset = NULL, origin_id = NULL, localmarket = NULL, check_df = TRUE)

Arguments

huffdataset
an interaction matrix which is a data.frame containing the origins, locations and the explanatory variables
origins
the column in the interaction matrix huffdataset containing the origins (e.g. ZIP codes)
locations
the column in the interaction matrix huffdataset containing the locations (e.g. store codes)
attrac
the column in the interaction matrix huffdataset containing the attractivity variable (e.g. sales area)
dist
the column in the interaction matrix huffdataset containing the transport costs (e.g. travelling time)
gamma
a single numeric value for the exponential weighting of size (default: 1)
lambda
a single numeric value for the exponential weighting of distance (transport costs, default: -2)
atype
Type of attractivity weighting function: atype = "pow" (power function), atype = "exp" (exponential function) or atype = "logistic" (default: atype = "pow")
dtype
Type of distance weighting function: dtype = "pow" (power function), dtype = "exp" (exponential function) or dtype = "logistic" (default: dtype = "pow")
gamma2
if atype = "logistic" a second $\gamma$ parameter is needed
lambda2
if dtype = "logistic" a second $\lambda$ parameter is needed
output
argument that indicates the type of function output: if output = "shares", the Huff function returns an interaction/probability matrix), if output = "total", the function returns the total sales of the locations. Default: output = "shares"
localmarket_dataset
if output = "total", a data.frame is needed which contains data about the origins
origin_id
the ID variable of the origins in localmarket_dataset
localmarket
the customer/purchasing power potential of the origins in localmarket_dataset
check_df
logical argument that indicates if the given dataset is checked for correct input, only for internal use, should not be deselected (default: TRUE)

Value

Returns either the input interaction matrix including the calculated shares (p_ij) (if output = "shares") or the total sales (sum_E_j) and total shares (share_j) of the stores locations (if output = "total"). Both results are data.frame.

Details

The Huff model (Huff 1962, 1963, 1964) is the most popular spatial interaction model for retailing and services and belongs to the family of probabilistic market area models. The basic idea of the model is that consumer decisions are not deterministic but probabilistic, so the decision of customers for a shopping location in a competitive environment cannot be predicted exactly. The results of the model are probabilities for these decisions, which can be interpreted as market shares of the regarded locations ($j$) in the customer origins ($i$), $p_{ij}$, which can be regarded as an equilibrium solution with logically consistent market shares (0 < $p_{ij}$ < 1, $\sum_{j=1}^n{p_{ij} = 1}$). From a theoretical perspective, the model is based on an utility function with two explanatory variables ("attractivity" of the locations, transport costs between origins and locations), which are weighted by an exponent: $U_{ij}=A_{j}^\gamma d_{ij}^{-\lambda}$. This specification is relaxed is this case, so both variables can be weighted by a power, exponential or logistic function. This function computes the market shares from a given interaction matrix and given weighting parameters. If output = "total" you need local market information about the origins (e.g. purchasing power, population size etc.) filed in another data.frame, so the function results are the total sales/shares of the given stores/locations.

References

Huff, D. L. (1962): “Determination of Intra-Urban Retail Trade Areas”. Los Angeles : University of California.

Huff, D. L. (1963): “A Probabilistic Analysis of Shopping Center Trade Areas”. In: Land Economics, 39, 1, p. 81-90.

Huff, D. L. (1964): “Defining and Estimating a Trading Area”. In: Journal of Marketing, 28, 4, p. 34-38.

Loeffler, G. (1998): “Market areas - a methodological reflection on their boundaries”. In: GeoJournal, 45, 4, p. 265-272.

Wieland, T. (2015): “Nahversorgung im Kontext raumoekonomischer Entwicklungen im Lebensmitteleinzelhandel - Konzeption und Durchfuehrung einer GIS-gestuetzten Analyse der Strukturen des Lebensmitteleinzelhandels und der Nahversorgung in Freiburg im Breisgau”. Projektbericht. Goettingen : GOEDOC, Dokumenten- und Publikationsserver der Georg-August-Universitaet Goettingen. http://webdoc.sub.gwdg.de/pub/mon/2015/5-wieland.pdf

See Also

converse, reilly

Examples

Run this code
data(Freiburg1)
# Distance matrix for grocery stores in Freiburg
data(Freiburg2)
# Statistical districts of Freiburg
groceryfr <- huff (Freiburg1, "district", "store", "salesarea", "distance", gamma=1, lambda=-2)
# Huff interaction matrix for given grocery stores in Freiburg
# with standard weighting (power function with gamma=1 and lambda=-2)
groceryfr_total <- huff (Freiburg1, "district", "store", "salesarea", "distance", 
gamma=1, lambda=-2, localmarket_dataset = Freiburg2, origin_id = "district", 
localmarket = "ppower", output="total")
# Calculating total sales of the stores

Run the code above in your browser using DataLab