Spatial Interaction (Gravity) Flow Model
Spatial interaction models explain flows between places, such as commuters, migrants or shoppers, by the size of the origin, the attractiveness of the destination and the cost of travel between them. The family includes unconstrained, production-constrained, attraction-constrained and doubly constrained forms; the constrained forms reproduce the known totals leaving each origin and/or arriving at each destination.
공간 상호작용 모형은 통근자, 이주자, 쇼핑객 같은 장소 간 흐름을 출발지의 규모, 도착지의 매력도, 둘 사이의 이동 비용으로 설명합니다. 비제약, 발생 제약, 도착 제약, 이중 제약 형태가 있으며, 제약 형태는 각 출발지에서 나가거나 각 도착지로 들어오는 알려진 총량을 그대로 재현합니다.
How quickly do flows between places fall off with distance, and how much do origin size and destination attractiveness matter?
장소 사이의 흐름은 거리에 따라 얼마나 빨리 줄어듭니까? 출발지 규모와 도착지 매력도는 얼마나 중요합니까?
The method returns the distance-decay coefficient and mass elasticities with quasi-Poisson standard errors, the fit (SRMSE, R2 between observed and fitted flows, deviance), the overdispersion, and observed and fitted mean trip costs.
When to use Spatial Interaction (Gravity) Flow Model
- You have an origin-destination table of flows with distances or travel costs.
- You need the distance-decay parameter for planning or accessibility work.
- You want fitted flows that respect known origin or destination totals.
When to use something else
- You analyse bilateral trade over years with exporter-year and importer-year effects: use PPML Gravity Model
- You have individual trips with traveller attributes: use a discrete choice model instead
Assumptions and requirements
- Flows are counts (or count-like) with a log-linear mean
- Distance decay has the chosen power or exponential form
- Overdispersion is absorbed by the quasi-Poisson scale
What the analysis reports
- Distance-decay and mass coefficients with SE
- SRMSE, R2 and deviance
- Observed and fitted mean trip cost
How to report it
A doubly constrained spatial interaction model gave a distance coefficient of [value] (SE [value]); SRMSE = [value].
Related methods
How this method is validated
이 방법의 검증 근거
- Independent computation. 1 reference test compares the results with SciPy and statsmodels at a stated tolerance of 1e-5.
독립 계산. SciPy·statsmodels 대조 참조 시험 1건 통과(허용오차 1e-5).
Tolerances are relative differences (absolute differences for values near zero). R comparisons and reference tests are re-run before each release of the analysis engine.
허용오차는 상대 차이입니다(0 근처 값은 절대 차이). R 대조와 참조 시험은 분석 엔진을 배포할 때마다 다시 돌립니다.
Run Spatial Interaction (Gravity) Flow Model on Quorant
- Data you need
- a table (CSV or Excel) with an outcome variable, source, target and predictor (feature) columns
- Price
- 400 credits for one analysis up to 10,000 rows (complexity level 3); larger or wider data costs more. Optional methodologist review: 1800 credits.
- Checking
- Compared with independent computations
- Before you pay
- A free pre-analysis diagnosis checks your data and gives an exact quote; nothing is deducted until you approve it.