- Introduced by
- Alan Wilson (entropy-maximizing family)
- Year
- 1971
- Type
- Model of flows between spatial origins and destinations
- Family
- Spatial interaction
What does it do?
Spatial interaction models, also called gravity models, predict the volume of flows (migrants, commuters, shoppers, trade, trips) between origins and destinations from the sizes of the places and the distance or cost separating them.
By analogy with Newton's law of gravitation, flow is expected to rise with the size of origin and destination and to fall with separation. Wilson's 1971 paper showed that the gravity form is not a single equation but a family of spatial interaction models.
The intuition behind the method
Larger cities send and receive more migrants, and nearby stores draw more shoppers than distant ones. The gravity analogy captures this pattern: the flow between two places grows with how large or attractive each one is and shrinks as the distance or travel cost between them increases. A deterrence function sets how quickly interaction falls off with separation. Accounting constraints require that the flows leaving each origin sum to its known total and the flows arriving at each destination sum to its known total. With these constraints the model reproduces observed marginal totals while distributing flows according to size and proximity.
History
Ideas of gravitation between places appeared in earlier empirical work on migration and retail trade, but the family of models was given a theoretical basis by Alan Wilson's 1971 paper. That paper showed that the gravity form is a family of spatial interaction models, and it also outlined disaggregation and the incorporation of time variables. The constrained production, attraction and doubly-constrained variants used in transport planning derive from this framework. Fotheringham's 1983 competing-destinations theory, listed in the references, addresses the spatial-structure bias of the basic form.
When to use it
Use spatial interaction models when the question concerns flows between a set of origin zones and destination zones, and you have a size measure for each origin and destination together with a distance or cost between each pair. They suit trip distribution and commuting in transport planning, inter-regional migration, retail catchment analysis, and bilateral trade, and they are useful for scenario forecasts such as a new road or store that changes a destination's size or a travel cost. Choose the constrained form that matches what is known: origin totals, destination totals, or both. Do not use the basic form when the flows are strongly shaped by competition among alternative destinations, because it then suffers spatial-structure bias and needs competing-destinations terms. If the question is about individual choices among alternatives rather than aggregate flows, a discrete-choice model such as multinomial logit is a more direct framework, since the gravity analogy is descriptive and not derived from individual behaviour.
Limitations and considerations
- The gravity term is descriptive and is not derived from individual utility, so it does not by itself explain why a particular destination is chosen.
- The basic form ignores the accessibility of alternative destinations, which produces spatial-structure bias and motivates competing-destinations specifications.
- Fitted distance decay and parameter estimates depend on the deterrence form and on the zoning system; changing the zones can change the fitted results (the modifiable areal unit problem).
- Least squares on logged flows cannot use zero-flow pairs and assumes constant variance on the log scale, so Poisson estimation is preferable for count flows.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- The model can be estimated as a Poisson regression with covariates added to the log-linear form, so standard count-model tools apply.
- Constrained variants reproduce known origin or destination totals, which is why they are the standard in trip distribution.
- The distance-decay function is calibrated from data, so the rate at which interaction falls with separation is estimated rather than assumed.
- Scenario forecasts, such as changing a destination's size or a travel cost, follow directly from the fitted formula.
Applications
- Trip distribution and commuting flows in transport planning.
- Inter-regional migration modelling.
- Retail catchment analysis and store revenue forecasting.
- International trade flow (gravity model of trade) analysis.
- Hospital, school, or service patient/student flow estimation.
How it works
How it works
The basic form makes the flow from origin i to destination j proportional to the origin size Oᵢ raised to the power α and the destination size Dⱼ raised to the power β, divided by the separation dᵢⱼ raised to the power γ, with a scaling constant k. In the unconstrained model the exponents α, β and γ set how strongly each factor affects the flow.
Formula
T_{ij} = k\,\dfrac{O_i^{\alpha} D_j^{\beta}}{d_{ij}^{\gamma}}The deterrence function f(dᵢⱼ) converts separation into a weight that declines with distance. In the power-law form the weight falls as a power of distance; in the exponential form it falls at a constant proportional rate per unit of distance. Both use the symbol γ, but the two forms have different shapes and γ is on a different scale in each, so the values must not be compared directly. The parameter is estimated jointly with the other parameters, for example through the Poisson likelihood. The deterrence form can be chosen by comparing model fit (likelihood or deviance) across the power-law and exponential specifications, and the form used should be stated when results are reported.
Formula
f(d_{ij}) = d_{ij}^{-\gamma}\ \text{or}\ e^{-\gamma d_{ij}}\ (\text{distance decay})In singly-constrained variants the predicted flows from each origin sum to its known total, or the flows into each destination sum to its known total. Production-constrained models fix origin totals, attraction-constrained models fix destination totals, and doubly-constrained models fix both, which requires balancing factors. Constraints make the predicted marginals consistent with known totals, which is why they are standard in trip distribution.
Formula
\textstyle\sum_j T_{ij} = O_i,\ \sum_i T_{ij} = D_j\ (\text{singly/doubly constrained})The equation shown models the logarithm of the expected flow, log E[Tᵢⱼ], and a Poisson regression with a log link fits exactly this mean function. The intercept is written β₀ and is distinct from the destination exponent β. The free-exponent form applies to the unconstrained model. In constrained variants the origin and/or destination terms enter as fixed effects or balancing factors that absorb α and β, so those exponents are not separately estimated or reported. The expression given applies to power-law deterrence; with exponential deterrence the distance term is linear in distance instead. Flows are counts that often include zeros, so Poisson regression is commonly preferred to least squares on logged flows, since log zero is undefined and least squares drops those pairs. Least squares on log flows remains a separate alternative when all flows are positive.
Formula
\log E[T_{ij}] = \beta_0 + \alpha\log O_i + \beta\log D_j - \gamma\log d_{ij}\ (\text{Poisson, log link; unconstrained, power-law deterrence})Common pitfalls
- Fitting least squares to log flows and dropping zero-flow pairs, which removes the pairs with no interaction that carry information about distance decay.
- Fitting exponential deterrence but estimating with the power-law log form, which mis-specifies the distance term.
- Using the unconstrained form when origin or destination totals are known, so the predicted marginals do not match the observed ones.
- Comparing gamma across deterrence forms as if it were the same quantity.
- Interpreting a fitted distance decay as behavioural evidence when it may reflect omitted accessibility effects or zoning choices.
Frequently asked questions
Why is it called a gravity model?
By analogy to Newton's law of gravitation: interaction between two places is proportional to the product of their sizes (or attractiveness) and falls with the distance between them. The analogy is descriptive. It summarizes flow patterns well but is not derived from individual decision-making.
What does 'doubly constrained' mean?
A doubly-constrained model forces the predicted flows to sum to the known total leaving each origin and to the known total arriving at each destination, using balancing factors. It is used when both origin and destination totals are known. Singly-constrained variants fix only one side.
How should the model be estimated?
Flows are counts and often include zeros, so Poisson regression is generally the appropriate estimator for the multiplicative model. When deterrence is a power law, the model can be written in the log-linear form given above. Least squares on logged flows drops zero pairs and assumes constant variance on the log scale, which can bias results. Poisson regression with origin and destination terms is closely related to the entropy-maximizing formulation, but the exact correspondence depends on the constraints and fixed effects used.
Related methods
Sources
Wilson, A. G. (1971). A family of spatial interaction models, and associated developments. Environment and Planning A, 3(1), 1–32.
Open DOI referenceFotheringham, A. S. (1983). A new set of spatial-interaction models: the theory of competing destinations. Environment and Planning A, 15(1), 15–36.
Open DOI reference