1 Introduction

According to Tobler’s first law of geography, “everything is related to everything else, but near things are more related than distant things” (Tobler 1970). This is reflected by the distance deterrence parameter in standard spatial interaction models, and estimates of this parameter are sometimes given a behavioral explanation. There certainly is a behavioral element in explaining the parameter estimates. However, the literature provides convincing evidence that the pure behavioral interpretation calls upon controlling, for instance, spatial structure characteristics in the model formulation. Commuting is the form of spatial interaction to be considered in this paper, and gravity modeling is the standard device for estimation and predictions. Estimates of the distance deterrence parameter, in general, vary across countries and regions. This may reflect behavioral differences, but it may also reflect differences in the spatial structure.

Estimates of the distance deterrence parameter provide interesting information on spatial interaction per se. In addition, estimates are essential for predicting how spatial interaction is affected by changes in the spatial structure and transportation network characteristics. How will a new road connection affect commuting for a given spatial pattern of jobs and residents? This is, of course, a crucial question in a cost-benefit evaluation of the investments in road infrastructure, and the answer calls for estimates of the changes in commuting times and the distance deterrence parameter. If data on commuting flows are missing for the region, then the possibility should be considered to use estimates from some other region. This raises the issue of the transferability of such estimates over time and space (see, for instance, McArthur et al. 2011 for spatial transferability, and Elmi et al. 1999, for studying temporal transferability of work-trip distribution, based on models of different complexity). What kind of other region should be considered for estimates to be least biased? Is the parameter estimate autonomous to the change in the transportation network?

Our discussion provides suggestions on how to modify the standard gravity model to avoid omitted variable bias and provide more reliable predictions. Hence, this paper’s main ambition is to contribute to a firm understanding and interpretation of the distance deterrence parameter following a standard spatial interaction model and to provide helpful input for the evaluation and formulation of spatial interaction models.

To our knowledge, no empirical studies systematically examine how different aspects of spatial structure affect the estimates of the distance deterrence parameter in commuting. We neither perform an empirical study nor use controlled experiments to address the issues. To be more precise, we are using an agent-based approach, which is a microsimulation modeling approach. This allows for experiments that can hardly be made in real-world situations, like considering the effects of a partial change in a covariate. Hence, we can avoid complex causality issues and endogeneity problems. In this respect, the agent-based approach maintains some of the pertinency of empirical analysis while at the same time allowing for experiments similar to comparative static analysis in pure theoretical approaches. It offers the possibility of controlled experiments, accounting for more details and complexity than an analytical approach. This paper demonstrates the potential of such an approach to study how a specific economic state results from complex interactions between the agents in a synthetic population of households. The analysis to follow further demonstrates that an agent-based approach has a larger potential than empirical analysis to deal with issues related to simultaneity and causality. Another argument favoring the agent-based approach is that an empirical study of how spatial structure characteristics affect commuting flows calls for a massive amount of data.

The computing time has limited the number of experiments run, as each data point in the figures to be presented on average called for around 5 hours of computing time. The coding has been done in Mathematica. Other programming languages may run the experiments many times faster, and we are sure that more advanced programming, in addition, has the potential to speed up the computations considerably. Our ambitions for this paper are twofold. One is to demonstrate the potential of agent-based modeling to understand better how the outcome of complex interactions can explain and predict aggregate patterns in an economy. Due to the limitations of computer capacity, we had to run the agent-based experiments for a relatively small geography concerning the number of agents involved. With more resources available for computing and computer capacity, we are sure this approach can potentially analyze urban and regional systems of any size within a reasonable time perspective. However, the computing capacity limitation was not a significant problem for our second ambition. We think that the experiments provide exciting results related to spatial interaction modeling and essential and non-trivial insight into the relationship between spatial interaction and characteristics of the spatial structure.

We make no attempts to modify the standard doubly-constrained gravity model to account for characteristics of spatial structure, but the paper is partly motivated to suggest how the model should be modified. The basic model is presented in Section 2, including a review of literature discussing the distance deterrence parameter. Section 3 presents the agent-based modeling framework. This involves the geography, represented by the spatial configuration of towns, the demographics, the preferences of the agents, the spatial labor market interaction, and the supply and demand for housing. First, a benchmark scenario is defined in Section 4 before the results are presented in Section 5. Section 6 addresses simultaneity issues related to interdependencies between changes in spatial structure and changes in wages and housing prices. In Section 7, we discuss issues related to model performance and how sensitive predicted commuting flows are to the value of the distance deterrence parameter. Finally, concluding remarks are offered in Section 8.

2 The Distance Deterrence Parameter in a Standard Gravity Model of Commuting

In gravity models of trip distribution problems, spatial interaction is explained by the distance between an origin and a destination, the generativity of origins, and the attraction of destinations. For commuting, the generativity of origins is generally defined in terms of the number of workers residing in the zone. At the same time, the attraction of a destination is measured by the local number of jobs. A standard formulation of a doubly constrained gravity model is:

$$\begin{aligned} T_{ij}=A_iO_iB_jD_j\exp (-\beta d_{ij}) \end{aligned}$$
(1)
$$\begin{aligned} A_i=\left[ \sum _{j}B_jD_j\exp (-\beta d_{ij})\right] ^{-1} \end{aligned}$$
(2)
$$\begin{aligned} B_j=\left[ \sum _{i}A_iO_i\exp (-\beta d_{ij})\right] ^{-1} \end{aligned}$$
(3)

where:

\(T_{ij}\):

is the estimated number of commuters from origin i to destination j, \(i,j=1,...,n\)

\(O_i\):

is the observed number of trips originating from zone \(i=1,...,n\)

\(D_j\):

is the observed number of trips destinating in zone \(j=1,...,n\)

\(d_{ij}\):

is travelling time by car, from origin i to destination j; \(i,j=1,...,n\)

\(\beta\) is a distance deterrence parameter. \(A_i\) and \(B_j\) are the balancing factors that ensure the fulfillment of the marginal total constraints for this trip distribution problem; \(\sum _jT_{ij}=O_i\) and \(\sum _iT_{ij}=D_j\). For a discussion of the theoretical foundation of this model, see, for example, Erlander and Stewart (1990) or Sen and Smith (1995). The doubly constrained gravity model is equivalent to the multinomial logit model; see, for example, Anas (1983, 1984), and Reggiani et al. (2012) for more details on the relationship between these two modeling traditions. This means that the gravity model can be derived from stochastic utility theory, in addition to approaches dominated by the macro-oriented tradition that is inspired by social physics and based on the entropy concept.

As pointed out by, for example, Persyn and Torfs (2016), an unconstrained version of the model needs to be revised in a commuting context since it ignores the possibility that characteristics of other zones may influence the interaction between two zones. The introduction of the balancing factors means that many relevant spatial structure characteristics are accounted for. Sometimes, a hybrid model may be appropriate, where only some zones are constrained at either the interaction’s origin or destination side (Wilson 2010).

\(d_{ij}\) can be interpreted as a generalized measure involving expenses and time costs. The experiments in this paper are not specific on the value of time involved in commuting, but time costs can be seen as forgone earnings. Our estimate of commuting costs per unit of distance represents the generalized costs of commuting one more kilometer per day. Hence, the estimate reflects the opportunity costs of a longer journey to work. However, we assume no inconvenience costs are involved besides the expenses and the value of the time spent on the journey.

The gravity model for commuting flows can be derived from an entropy maximizing procedure, where one of the constraints defines an upper limit on total transportation costs. The distance deterrence parameter can be interpreted to measure the impact on commuting flows of a marginal release in the cost constraint. As Wilson (2010) pointed out, a reduction in the total expenditures on travel is equivalent to an increased value of the \(\beta\) parameter. A straightforward derivation of the gravity model from entropy maximization leads to a negative exponential impedance function, \(\exp (-\beta d_{ij})\). However, suppose the log values of traveling costs formulate the cost function. In that case, the resulting distance deterrence effect will be represented by a power function, \(d_{ij}^{-\beta }\), see for instance, Wilson (2010). Wilson (2010) indicates that a power function representation of distance may be appropriate if there are many long trips in an interurban geography. Based on Danish data on commuting flows, De Vries et al. (2009) found that a downward logistic function of log travel cost fits data well, corresponding to an S-shaped function. The exponential distance-decay function, however, did not perform well. They estimated just a single equation, however, not the complete model. Still, they demonstrate that allowing more flexible forms for the distance-decay function greatly improves the model performance. This is also supported by Halás et al. (2014), using a compound power-exponential function with an inflection point to explain daily travel-to-work data from the Czech Republic. The literature also supports that the choice of a deterrence function is essentially a pragmatic one (see, for example, Nijkamp and Reggiani 2012).

The interpretation of the distance deterrence parameter has been profoundly discussed in the literature, particularly in the late 70s and the 80s. It was demonstrated how leaving out relevant characteristics of spatial structure may result in biased parameter estimates that will not represent unbiased behavioral estimates of how variations in distance affect spatial interaction decisions. According to Tiefelsdorf (2003), this problem of interaction modeling did not receive much attention in the literature in the 90s, “even though no satisfactory solution has been found”. It appears to us that this is still an understudied area of research.

Theoretical and empirical contributions to the debate can be found in Cliff et al. (1974), Curry et al. (1975), Sheppard (1978, 1984), Fotheringham and Webber (1980), Fotheringham (19811983a, b1986), Ishikawa (1987), and Desta and Pigozzi (1991). Lo (1991) points out that this literature relied heavily on the migration context. In a commuting context, it is well known that the balancing factors in a doubly constrained gravity model formulation capture relevant spatial structure characteristics. However, as demonstrated by, for example, Thorsen and Gitlesen (1998); Gitlesen and Thorsen (2000), separate measures of spatial structure characteristics contribute significantly to explaining commuting flows, also in doubly constrained model formulations. Thorsen and Gitlesen (1998); Gitlesen and Thorsen (2000), for example, successfully incorporated into the model a so-called Hansen measure of labor market accessibility (Hansen 1959), corresponding to the competing destinations model formulation of spatial interaction, that was developed by Fotheringham (1983b), see also Fotheringham (1986), and Pellegrini and Fotheringham (2002) for a review. In studying journeys-to-work between German commuting districts, Reggiani et al. (2011) focus on the choice of impedance function in the accessibility measure used to capture the dynamics of commuting patterns. The power-decay function seems to capture such dynamics and connectivity better.

Some of this literature is also reviewed by Tiefelsdorf (2003), who also demonstrates how a proper model specification is of paramount importance in interaction modeling. Thorsen et al. (1999) account for spatial characteristics, such as the effect of intervening opportunities, in a network approach to explain and predict commuting flows. Accounting for relevant characteristics is, of course, important for producing unbiased parameter estimates, as well as for making reliable predictions, for instance, on interregional transferability problems (see, for instance, McArthur et al. 2011). However, in studying the temporal transferability of work-trip-distribution models, Elmi et al. (1999) found that the improvement in predictions “obtained from additional complexity in the specification did not warrant a recommendation for the use of more complex models”.

Based on data of Swedish commuting, John et al. (2016) found that doubly-constrained models and parameters result in a considerably lower Root Mean Square Error (RMSE) than their unconstrained counterparts. The doubly-constrained model is found to do an outstanding job in estimating commuting flows, but in a case where the number of spatial units becomes very large, John et al. (2016) argue that this model may be challenging from a numerical point of view. In such a case, John et al. (2016) recommend using the simple “Half-Life” decay function, in which the estimation of the distance deterrence parameter is based on information on the median commuting distance in the geography. John et al. (2016) also discuss the choice between an exponential and a power specification of the distance deterrence function and how the spatial distribution of the Hansen-type accessibility is displayed for different model specifications.

3 The Agent-based Modelling Framework

The agent-based modeling approach has been used to study, for example, the impact of decentralized decision-making on the observed spatial patterns (Page 1999; Batty 2005; Irwin 2010). According to Wilson (2010), we have a case of agent-based modeling when “the system of interest is populated by individual agents who are given (probabilistic) rules of behaviour”. This section explains how a population is generated, with a (random) diversity of preferences and random demographic characteristics based on regularities observed in Norwegian statistical data. The microsimulations account for both the decision-making of the agents and the functioning of the labor market and the housing market in the geography.

3.1 The Geography

We consider a spatial configuration of 12 nodes, or towns, as illustrated in Fig. 1. The towns A, B, C, and D are located on one side of a topographical barrier, while the other towns are located on the same side as zone E, which hosts the central business district of the geography. The following matrix gives the distances between the towns in the geography:

$$\begin{aligned} \left[ \begin{array}{cccccccccccc} 0 &{} 15 &{} 30 &{} 15 &{} 75 &{} 75 &{} 65 &{} 85 &{} 100 &{} 90 &{} 100 &{} 100 \\ 15 &{} 0 &{} 15 &{} 15 &{} 60 &{} 70 &{} 80 &{} 70 &{} 85 &{} 95 &{} 95 &{} 85 \\ 30 &{} 15 &{} 0 &{} 15 &{} 45 &{} 55 &{} 65 &{} 55 &{} 70 &{} 80 &{} 80 &{} 70 \\ 15 &{} 15 &{} 15 &{} 0 &{} 60 &{} 70 &{} 80 &{} 70 &{} 85 &{} 95 &{} 95 &{} 85 \\ 75 &{} 60 &{} 45 &{} 60 &{} 0 &{} 10 &{} 20 &{} 10 &{} 25 &{} 35 &{} 35 &{} 25 \\ 75 &{} 70 &{} 55 &{} 70 &{} 10 &{} 0 &{} 10 &{} 20 &{} 35 &{} 35 &{} 45 &{} 35 \\ 65 &{} 80 &{} 65 &{} 80 &{} 20 &{} 10 &{} 0 &{} 30 &{} 35 &{} 25 &{} 35 &{} 45 \\ 85 &{} 70 &{} 55 &{} 70 &{} 10 &{} 20 &{} 30 &{} 0 &{} 15 &{} 25 &{} 25 &{} 15 \\ 100 &{} 85 &{} 70 &{} 85 &{} 25 &{} 35 &{} 35 &{} 15 &{} 0 &{} 10 &{} 10 &{} 10 \\ 90 &{} 95 &{} 80 &{} 95 &{} 35 &{} 35 &{} 25 &{} 25 &{} 10 &{} 0 &{} 10 &{} 20 \\ 100 &{} 95 &{} 80 &{} 95 &{} 35 &{} 45 &{} 35 &{} 25 &{} 10 &{} 10 &{} 0 &{} 10 \\ 100 &{} 85 &{} 70 &{} 85 &{} 25 &{} 35 &{} 45 &{} 15 &{} 10 &{} 20 &{} 10 &{} 0 \\ \end{array} \right] \end{aligned}$$
Fig. 1
figure 1

The spatial configuration of towns in the geography

3.2 Demographics

Like McArthur et al. (2010), the initialization of the system is based on many fifteen-year-old utility-maximizing agents with given probabilities of being born in a specific town. They then interact for 300 years according to rules based on Norwegian statistical data, after which all the traces of the initial population are wiped out, and a population is made up that is representative of the Norwegian population. During one time-step (one month), agents can be born, marry, divorce, have children, apply for work, retire, or die. We know the state of each agent at any time, represented by information like gender, age, marital status, spouse, father, mother, children, house(s), address, work location, income, wealth, and utility parameters.

The rules in the model are the same as for the simple two-node system considered in McArthur et al. (2010). Any adult woman in the model can give birth, with the probability of doing so conditional on age and marital status. The sex of a child is determined randomly. If the woman is not married, the father is drawn randomly from the population of single men. Children are converted to adults when they reach the age 15, and people retire at 70. Adults can marry, divorce, have children, and apply for work. Mortality rates are based on standard life insurance tables, using Gompertz-Makeham’s law, i.e., that the function gives the death intensity of a man of age x:

$$\begin{aligned} \mu =a+bc^x \qquad \text {where} \qquad a=0.9,\, b=4.4\cdot 10^{-5} \hspace{2mm }\text {and} \hspace{2mm } c=1.10154 \end{aligned}$$

A three-year age correction adjusts the death rates of women. Single agents can get married, with the probability being conditional on age, sex, and previous marital status. Spouses are drawn from the population of single people, but there is a distance deterrence in marrying; the chances of marrying a person in another town are assumed to decline exponentially with distance:

$$\begin{aligned} \text {Max}\left[ e^{-\sigma \cdot d}, 0.01 \right] \end{aligned}$$

Here, d is the distance between the towns, and \(\sigma\) is a parameter controlling how quickly the probability declines with distance. When a couple marries, they move in together with any children they already have. Divorce rates are conditional on age and sex.

3.3 Preferences

The lifetime earnings are the relevant variable representing the consumption opportunities. In addition, the consumption opportunities depend on housing market transactions. Let \(V_i\) denote the lifetime earnings of individual i, plus the house’s current value minus the house’s price at the point in time when it was acquired. Hence, \(V_i\) measures the disposable income for consumption from a lifetime perspective. In addition, individuals are assumed to derive utility from housing consumption, represented by the house size and no other attributes. Let \(H_i\) be the house size of household i, represented by the number of squared meters. This defines a utility function like the one underlying the Alonso-Muth model of land use and housing markets (Alonso 1964; Muth 1969), and it is given by:

$$\begin{aligned} U_i(V, H)=V_i^{\alpha _i}H_i^{1-\alpha _i} \qquad 0<\alpha _i<1 \end{aligned}$$
(4)

where \(\alpha _i\) is the elasticity of the utility with respect to changes in lifetime disposable income. When we compute the agent’s disposable income, we must deduct transportation costs for their journey-to-work. \(V_i\) is hence calculated net of commuting cost. When agents consider relocating, they review all houses for sale and consider bidding for the house offering maximum utility. They bid if this house improves their utility compared to the utility of their current location.

The housing market conditions do, of course, influence the development in the different towns. Assume, for instance, that a worker accepts a job offer from an employer in another town. Commuting and migration represent two alternative responses in terms of spatial interaction. The migration option involves finding a new house in another town, which means that housing prices and mechanisms in the housing market affect the decisions to migrate or not, and vice versa. In general, migration decisions reflect both the spatial variation in housing prices and the spatial variation in local job opportunities.

3.4 Employment, and Spatial Labour Market Interaction

The workers are assumed to be homogenous in terms of labor market qualifications. They apply for vacant jobs in the region if this contributes to a net gain in utility for the household. Job applicants are randomly selected for vacant positions, and those employed may stay in the job until they retire. If a worker accepts a job offer in another town, one option is to move there. For a married worker, this requires that the sum of utilities of the spouses is increased, accounting for changes in housing and other consumption. Alternatively, the worker will have to commute to the new job location. Unemployed agents receive an insurance payment.

There are two types of firms. The local sector firms serve the local population, while the basic sector firms serve demand in other regions and countries. Basic sector production is assumed to be exogenously given. In export-base theory, local sector employment is often assumed to be proportional to the local number of inhabitants. However, as argued and demonstrated in Gjestland et al. (2006), the density of local sector activities tends to be higher in a region’s central business district (cbd). It is, in particular, customers in nearby towns who shop in the cbd, as a result of comparing traveling costs to benefits in terms of lower prices and economies of scope in shopping. For towns located further from the cbd, the dominant part of the shopping takes place within the town. Hence, the local sector activities tend to be high in the cbd, low in suburban towns, and close to the regional average in towns far from the cbd. Along this line of argument, our agent-based modeling framework incorporates the model presented by Gjestland et al. (2006). McArthur et al. have parameterized and applied the model (McArthur et al. 2014, 2020).

The wage rate is set higher in the cbd than in the other towns initially due to the hypothesis of agglomeration economies in the labor market. For the following years, wages are determined through a local Phillips curve style mechanism, opening for wage disparities across the towns (McArthur et al. 2010). The wages are assumed to be the only source of income for employees, and there is an income tax, in addition to a fixed amount of money spent on, for example, taxes related to power, water supply, etc., and other expenses that are considered to be necessary for a comfortable life.

3.5 The Housing Market

The housing market is one of the determinants of the migration/commuting tradeoff. Significant spatial disparities in housing prices are, for instance, expected to contribute to reducing the probability of moving from an area with low housing prices to an area with high housing prices, pulling in the direction of commuting-based solutions in this direction. The local housing prices are endogenously determined in the model, responding to the balance between demand and supply in the local housing market.

3.5.1 Housing Demand

The housing demand is represented by a bidding procedure. The bidding procedure uses first-price sealed bid auctions, in which all bidders submit their bids simultaneously, and the highest bid wins the auction. According to auction theory, see, e.g., Krishna (2002), a Bayesian Nash equilibrium is obtained when bidder i has a valuation \(v_i\) and bids

$${{N-1}\over N}v_i,$$

where N is the number of bidders in the auction. The factor \({{N-1}\over N}\) leads to significantly lower bids when N is small, and this effect appears crucial to get a reasonable price development in the housing market.

The factor is not meaningful if \(N=1\), and in our model, we have instead used the factor \(\max [{{N-1}\over N},{1\over 2}]\) to take that into account. Anticipating that in real-world auctions, the number of bidders is not always evident, we have used an adjustment

$$\begin{aligned} 0.2+0.8\max \left[ {{N-1}\over N}, {1\over 2}\right] , \end{aligned}$$

bidders may sometimes fear that slightly more people might be interested in bidding and are placing a slightly higher bid. This reduces the strength of the factor to 80% of its original strength.

Who are the bidders in the auction? At each time step, the agents make a random check to see if they might be interested in joining a pool of potential bidders and join the pool if the check is successful. Which houses are for sale? Our model has a pool of houses for sale. At each time-step, new houses might be added. The government builds new houses when there is sufficient demand, and house owners make a random check, and if successful, his or her house is added to the pool. The house is removed from the pool when a sale is successfully executed.

How do the agents value a house? All agents in the pool of potential bidders scan the pool of houses for sale in search of the house that provides them with the maximal utility. In their utility valuations, they assume that houses can be bought for the quoted price, using the price per area unit in the previous period as a benchmark. They compare this utility to their current state of affairs and join a sub-pool of bidders for this property if they find that the new house would improve their position.

How is the auction carried out? For each house in the pool of houses for sale, the program constructs a sub-pool of bidders. If this sub-pool is non-empty, the program puts \(N=\text {number of bidders in the sub-pool}\). Each bidder draws a random number from a log-normal distribution with parameters \(\mu\) and \(\sigma\). To avoid wild outliers, \(\sigma\) must be relatively small, and in our computations, we have used \(\sigma =0.1\). For a log-normal distribution, we have

$$\begin{aligned} E[X]=e^{\mu +\frac{1}{2}\sigma ^2} \end{aligned}$$

Hence if we put \(\mu =-{1\over 2}\sigma ^2\), we get \(E[X]=1\). If an agent would improve his or her position considerably by winning the auction, he or she should be inclined to place a higher bid. To take this into account in our model, we have used

$$\begin{aligned} \mu =\ln \left( 0.7+0.3(1-{\text {utility of current state}\over \text {utility of new state}})\right) -{1\over 2}\sigma ^2 \end{aligned}$$

The bidder then places a bid

$$\begin{aligned} \text {bid}=X\cdot \left( 0.2+0.8\max \left[ {{N-1}\over N},{1\over 2}\right] \right) \cdot \text {quoted price}. \end{aligned}$$

The bidder with the highest bid wins the auction. Since the last two factors are the same for all agents, only the value of X determines the winner. The two other factors are, however, necessary in comparing reservation prices and updating housing prices in the towns. When is a sale completed? The seller inspects the winning bid, and if this bid exceeds his or her reservation price, the sale is carried out. If not, the house remains in the pool of houses for sale. The reservation price is computed from formulas similar to those used in the utility considerations above.

As a technical note, degenerate cases sometimes occur in the formulas above, and the program takes such cases into account. Moreover, we capped bids when they were 7.5% lower/higher than the quoted prices. Capping the bids in this way, we avoid wild behavior occurring when quoted prices are based on a small number of transactions, in extreme cases, only one.

3.5.2 Housing Supply

A regional government planning entity determines the initial supply of housing, and new houses are generally built according to a minimum frequency of 5% yearly in each town. In addition, if a town experiences a high demand and a correspondingly high increase in housing prices in the previous year, then this is allowed to be reflected in a high building frequency of new houses provided by either public or private agents.

$$\begin{aligned} HS_j^{t}=\left\{ \begin{array}{ll} HS_j^{t-1}\cdot 1.05\cdot \left( \frac{P_{hj}^{t-1}}{P_{hj}^{t-2}} \right) ^\gamma &{} \text {if} \qquad \frac{P_{hj}^{t-1}}{P_{hj}^{t-2}}>1.05 \\ 1.05 &{} \text {otherwise} \ \ \end{array} \right. \end{aligned}$$

where \(HS_j^t\) is the housing supply in town j in year t, and \(P_{hj}^{t}\) is the housing price per squared meter in town j in year t. \(\gamma\) is the elasticity of housing supply with respect to the price increase observed in the previous year.

4 Defining the Initial State and a Benchmark for Experiments

The agent-based modeling framework is used to generate commuting matrices corresponding to different specifications of the spatial structure. We are monitoring how different scenarios and numerical experiments affect the estimates of the distance deterrence parameter from the standard doubly constrained gravity model. As demonstrated and discussed in Section 6, this can be done analogous to comparative static approaches in a pure analytical framework, focusing on the impact of partial changes in an exogenous variable on a set of endogenous variables. However, our modeling framework is dynamic. Agents make decisions based on life cycle considerations, and the system’s state changes continuously as a response to numerous independent individual decisions. The analysis is based on a set of simplifying assumptions; we have, for instance, abstracted from worker and job heterogeneity. Still, the curves in the figures to follow reflect the outcome of very complex mechanisms, like the competition for jobs and houses, for households that tend to have more than one worker.

As a first step, we start with a population of 15000 17-year old. Initially, the individuals are evenly distributed across the towns in our geography, except for the cbd (zone E), which is allocated five times more people than the other towns. The same applies to the initial number of 4000 houses. Through rules defined by Norwegian average rates of marrying, births, deaths, etc., the members of this population then interact over 300 years, which is by a good margin sufficient to generate a population very similar to the Norwegian in a demographic sense. After these 300 years of initialization, housing, and labor market characteristics are introduced as essential inputs for the location decisions of households and firms.

The system was then run for another 50 years, during which agents accounted for relevant housing and labor market characteristics, like housing prices, traveling costs, and wages. This dynamic system, with a continuously changing population, does not reach a steady state equilibrium. Still, we have done experiments on the level of migration and commuting costs, the balance between jobs and workers, and a set of parameters to reach a state after 50 years with reasonable values of endogenous variables, like housing prices, unemployment rates, and wages. The mechanisms and parameter values of our benchmark scenario are as follows:

  • Preferences. The weight attached to general consumption, \(\alpha _i\) in Eq. (4), can vary randomly, uniformly distributed across individuals, within the interval (0.3-0.7).

  • Housing supply. The housing supply elasticity \(\gamma = 1\), see Section 3.5.2. The initial price of building a house is 5,000 per square meter and the construction price increases by 1% per year. It takes one year to construct a house.

  • The spatial distribution of local and basic sector jobs. The local sector employment in the region is assumed to be 20% of the total population in the region, distributed between towns according to the same parameterization as in McArthur et al. (2014, 2020). In addition, we consider a case where the relevant spatial distribution of local sector employment is substituted by an assumption of equal local sector density in all the towns, equal to 20% of the local population. Table 1 presents the spatial distribution of basic sector employment. No attempts have been made to explain the distribution by spatial differences in innovativeness, creativity, knowledge, entrepreneurship, etc.

  • Wages The wage in year 0 is NOK 100000 in all the zones except the cbd, zone E, where the yearly wage rate is initially assumed to be NOK 115000. The unemployment insurance is set to be NOK 60000 in all the zones in year 0. Both wages and unemployment insurance are assumed to increase by 2.5% yearly. The parameter representing the sensitivity of wages to changes in the local level of unemployment is given by \(\lambda =0.1\). In addition, there is a 28% income tax, while mortgages and lifetime incomes are calculated using a discount rate of \(2.5\%\).

  • Commuting costs The generalized round-trip commuting costs are assumed to be NOK 0.6 per kilometer in year 0, incurred over 200 working days per year. The commuting costs are increasing by 2.5% per year.

Table 1 Zonal values of basic variables in the benchmark scenario

The chosen size of the initial population and jobs reflect a trade-off between computing time and the call for unveiling robust relationships between different variables. Let \(BASE_j^{t}\) be the number of basic sector jobs in town j in year t, \(POP_j^{t}\) is the population in town j in year t, while \(TOT_j^{t}\) is the total number jobs in town j in year t. Table 1 offers information on how the population and the jobs are distributed across the towns after 50 years, given the initial distribution of basic sector jobs. The table, in addition, offers information on the unemployment rates (\(U_j\)), the housing prices (\(P_{hj}\)), and the wages (\(w_j\)) in the 12 towns in year 50. Notice that the cbd, town E, has many times higher housing prices than the other towns. This corresponds to a high concentration of jobs, covered by a substantial in-commuting from the other towns in the system. Notice also that the high demand for labor in the cbd has caused an increased nominal wage disparity between the cbd and the other towns. At the same time, the relative difference has remained at approximately the same level over time.

5 Results of Changing the Spatial Structure

Fotheringham (1981) and Lo (1991) define spatial structure as “the size and configuration of origins and destinations” of a regional system, while Tiefelsdorf (2003) emphasizes “the mutual distances among representative points of the region”. Based on such definitions, any changes in the road transportation infrastructure that alter the different towns’ positions are considered changes in spatial structure, as are changes in the spatial distribution of jobs.

Our approach is to introduce specific changes, like the location of the regional center, the distribution of basic sector jobs throughout the zones, the road transportation network, and the system’s compactness, represented by the distances between the zones. We do controlled experiments by considering one exogenous change at a time. For each change, we run our agent-based model. This model simultaneously predicts how the change affects.

  • the housing market in terms of housing prices and the provision of new houses

  • the labour market in terms of wages and the spatial distribution of local sector jobs

The new spatial equilibrium location pattern results from how changes in spatial structure and accessibility patterns affect the local housing demand and shopping location decisions. Shopping is represented by the local sector density function explained in Section 3.4, while the core element of the bid rent theory explain the effects on local housing demand. The effects of changes in the residential location pattern and shopping destinations are expanded by economic base mechanisms, inducing a new spatial distribution of jobs and people. The agent-based modeling framework integrates land use and transportation. Hence, the predicted change in the location pattern is mirrored by corresponding changes in the activity-based commuting flows. This means that the agent-based model generates a new “observation” of a commuting matrix, evolving from any exogenous shock that is introduced. All the “observed” changes in the location pattern and the commuting flows are next imputed into the doubly-constrained gravity model as a framework for estimating new values of the distance deterrence parameter \(\beta\) in Eq. (1). As will be discussed and demonstrated in Section 6, the general equilibrium character of the data-generating model introduces simultaneity and causality issues relevant to the interpretation of the results. However, underlying preferences are kept constant and do not contribute to explaining changes in the estimates of the distance deterrence parameter. The cases that will be studied differ from our benchmark scenario as follows:

  • Case CBD The cbd of the region is town B rather than town E. As compared to our benchmark situation, all zone-specific information is swapped between these two zones. This applies for instance to the number of basic sector jobs.

  • Case EVEN The distribution of basic sector jobs are more evenly spread throughout the zones than in our benchmark scenario, Hence, this test defines a less centralized system.

  • Case BRIDGE We introduce a major change in the road transportation network, in that a bridge/tunnel is connecting the towns B and E.

  • Case LSD The local sector density is 0.2 in all towns, rather than the spatial distribution of local sector densities as suggested by Gjestland et al. (2006), see Section 3.4.

  • Case DISPERSION For a system of towns that is more compact than the benchmark scenario, we let all the distances in the system be reduced by a factor of 0.5, while all the distances are increased by a factor of 1.5 in a more dispersed configuration of towns.

It is reasonable to think of the cases EVEN and BRIDGE to materialize at a specific point in time. The position of a town as the regional center, on the other hand, can develop as a result of a more slow-moving process. Rather than introducing a change of cbd in year 50, we compare our benchmark scenario to an alternative where the cbd is assumed to be town B from the start. Similarly, it also makes more sense to discuss both the cases LSD and DISPERSION in developing from year 0 rather than appearing at a specific point in time.

5.1 An Altenative Location of the cbd; Case CBD

The result of case CBD on \(\hat{\beta }\) is illustrated in Fig. 2. The initializing period reflects location responses to the job and residential opportunities. Eventually, the location pattern approaches a state where the spatial distribution of jobs and households is relatively stable across the 12 towns. Still, in this dynamic system, with births, deaths, marriages, relocations, etc., the location pattern and the estimated distance deterrence parameter do not converge in the sense that a specific value is reached. The system approaches a state where the corresponding estimates of the distance deterrence parameter are centered around a specific level.

Fig. 2
figure 2

Estimates of the distance deterrence parameter over the first 50 years, for two alternative locations of the cbd in the region

It follows from Fig. 2 that the values of the distance deterrence parameter are systematically lower in the case where town B is the regional center. Before explaining this difference in observed commuting response to distance, notice that the change in cbd has a considerable impact on variables related to commuting. It is, of course, intuitively reasonable that the change of cbd-location benefits the least populous area, which in year 50 has 42.9% of the jobs and 42.2% of the population in the region. In the benchmark scenario, the corresponding figures were 24.2% and 35%, respectively.

The position as the cbd reflects a high concentration of local sector jobs and a higher concentration of basic sector jobs allocated to the cbd. When the cbd is located in the least populous area, this concentration of jobs attracts more long-distance commuting. Consequently, the observed commuting matrix has more commuting between distant O-D combinations, explaining the markedly lower value of the distance deterrence parameter illustrated in Fig. 2. As a general conclusion, this suggests that if many people live a long distance from the cbd, there will be a tendency for the observed commuting flow data to result in a low estimated distance deterrence.

5.2 A Spatially More Even Distribution of Basic Sector Jobs; Case EVEN

Figure 3 illustrates \(\hat{\beta }\) in EVEN and BRIDGE cases. The figure is defined up to year 65 to account for possible systematic trends that may be present even after 50 years of initialization and adaption to the initial specification of exogenous variables and parameters.

Fig. 3
figure 3

Estimates of the distance deterrence parameter in cases with a more even spatial distribution of basic sector jobs, and a bridge connecting town E (the cbd) and town B

In case EVEN, 1100 basic sector jobs are redistributed from the cbd, and each of the 11 other towns is allocated 100 new basic sector jobs. Figure 3 shows that this results in a commuting pattern corresponding to a higher \(\hat{\beta }\) than in our benchmark scenario. Notice also from Fig. 3, the tendency that the difference \((\hat{\beta }^{\text {EVEN}}-\hat{\beta }^{\text {benchmark}})\) is increasing over time, peaking around year 61.

It takes quite a long time after the job redistribution shock before a commuting pattern emerges that corresponds to a relatively stable value of \(\beta\). This value is higher than in the benchmark case, reflecting a commuting pattern where distance appears more of a barrier. Commuting towards the cbd is substantially reduced when jobs are decentralized in case EVEN, around 24% of the workers living outside the cbd commute towards the cbd in year 65. At the same time, this applies to around 36% of the workers in the benchmark case. With reduced prospects of receiving job offers in the cbd, workers will, to a larger degree, settle down with solutions involving low commuting expenses. Households may be content with a solution where both spouses work in the town where they live.

In this dynamic system, such a search for solutions involving low commuting expenses may progress long before converging toward a dynamic equilibrium level. Consider the proportion of workers who work in the same town where they live. For case EVEN, this proportion was around 24% in year 65 for workers living outside the cbd, while the corresponding proportion was around 18% in the benchmark scenario. This explains the higher \(\hat{\beta }\) in case EVEN, with workers seemingly more reluctant towards long-distance commuting.

5.3 A New Bridge Between Towns B and E; Case BRIGDE

A bridge between the towns B and E also defines a new spatial configuration of towns. As illustrated in Fig. 3, the new bridge is causing a marked and persistent increase in the yearly estimates of the distance deterrence parameter. This impact on \(\hat{\beta }\) comes as an immediate response to the bridge. At this point, the commuting pattern represents an adaptation to the situation without a bridge. Hence, many O-D combinations at a relatively short distance from each other, on either side of the barrier, have very few commuters. Workers then appear reluctant to commute over such distances, evaluated by the new distance matrix.

Adapting to the new situation goes on over a long period, with workers searching for O-D combinations, making them well off in terms of wage, housing price, and commuting expenses. In year 65, commuting between the two areas on either side of the topographical barrier (bridge) increased by around 11% compared to year 50. This increase is explained by the commuting from the smallest area towards the cbd-area. As a result of the bridge, high-wage jobs in the cbd have become more appealing for workers living across the former barrier. Over time, there is a tendency that they replace the workers from the most distant towns of the cbd-area from working in the cbd. The system then works toward a new dynamic equilibrium with less long-distance commuting than before the changed road network. This contributes to explaining the persistently higher estimate of the distance deterrence parameter than in the benchmark scenario, with workers seemingly more reluctant towards long-distance commuting than before the investments in road transportation infrastructure. After the new bridge prompted an immediate effect on the ddp estimates, the following adaptation did not involve any systematic trends to be seen in Fig. 3. Similar to the development in the benchmark scenario as well as in the real world, the reported variations reflect stochastic variations, which is reasonable in a dynamic system with complex interactions between agents and towns.

This case represents the most obvious demonstration that our results have important policy implications. Without accounting for the possibility that the values of the distance deterrence parameter are not autonomous to the planned changes in the transportation network, the planning agency will use the estimate in the benchmark situation in predicting induced traffic. The post-bridge ddp estimate will be considerably higher, so the planning agency substantially overestimates induced commuting. Hence, this leads to a seriously false basis for decision-making.

5.4 A Less Clustered Distribution of Local Sector Jobs; Case LSD

In the case of LSD, local sector employment in the cbd is considerably downsized, and less commuting is attracted to the regional centre. This case ignores the possibility of economies of scale and scope in shopping, ignoring the basic mechanisms underlying Reilly’s law (Reilly 1953). The corresponding shopping behavior deviates substantially from the more centralized pattern in the benchmark scenario. The effect on \(\hat{\beta }\) is illustrated in Fig. 4.

Fig. 4
figure 4

Estimates of the distance deterrence parameter in the case where local sector densities are proportional to the size of the population

Case LSD is based on the assumption that alternative shopping behavior has been unchanged since the beginning of the period under consideration rather than as a sudden change at a specific point in time. It appears from Fig. 4 that \(\hat{\beta }\)s continue to increase even after the initializing period needed for the benchmark scenario to reach a state with relatively stable \(\hat{\beta }\)s.

Despite the different time perspectives in the experiments, the development in case LSD is more similar to case EVEN, where the period of increasing \(\hat{\beta }\)s lasts considerably longer than for the two other cases in Fig. 3. Both case EVEN and case LSD correspond to a more even spatial distribution of jobs across the towns in the geography. Hence, there will be less commuting toward the cbd, and the prospects of getting better-paid jobs are reduced. Still, workers continue searching for solutions involving low commuting expenses, high wages, and low housing prices. This is a slow process in this dynamic system, and it can be useful to study, for instance, what happens to the relative number of workers taking advantage of working and living in the same town. Figure 5 illustrates the development of the percentage number of non-commuters.

Fig. 5
figure 5

The percentage number of workers living and working in the same town, in the benchmark scenario and in case LSD

Notice that the pattern of the two lines in Fig. 5 resembles the lines in Fig. 4. It makes sense that many non-commuters correspond to a high value of \(\hat{\beta }\). It also makes sense that the number of non-commuters eventually falls in our benchmark scenario but remains stable in LSD. In the benchmark scenario, more workers succeed in taking advantage of a high-wage employment in the cbd. Figure 5 reflects a pattern in the benchmark scenario where many workers first go for a solution with work and residence in the cbd. Over time, however, workers living in other zones tend to search for high-wage jobs in the cbd, choosing a situation with commuting rather than moving into the cbd, where housing prices are higher than elsewhere in the geography. This leads to a situation where in-commuters occupy jobs in the cbd, contributing to a falling number of non-commuters. This is, to a minor degree, when local sector jobs are more evenly spread throughout the geography, reducing the prospects of getting highly paid jobs in the cbd.

Hence, the explanation of the relatively high \(\hat{\beta }\)s in case LSD is the same as for case EVEN. In cases with a less centralized pattern of jobs, the relevant parameter estimates tend to be higher, no matter if the decentralization of local or basic sector jobs causes it.

5.5 Different Degrees of Spatial Dispersion Between Towns; Case DISPERSION

The estimates of \(\beta\) represented by the curve denoted “Compact” in Fig. 6 refer to a case where all distances are reduced to half, while the curve “Dispersed” is based on an experiment where all distances between the towns are increased by a factor of 1.5.

Fig. 6
figure 6

Estimates of the distance deterrence parameter in cases with different degrees of spatial dispersion in the pattern of towns in the geography

The most compact system of towns results in substantially higher \(\hat{\beta }\)s. A highly-paid job in the cbd is attractive, even if it calls for commuting from the towns most distant to the cbd in this compact system. This pulls in the direction of a low value of \(\beta\). Aside from working for a high wage in the cbd, it is still attractive, even in this compact system, to work and live in the same town, saving the household for commuting expenses. With many non-commuters in a system with short distances, workers appear to be highly distant-deterrent in commuting. The preference towards non-commuting pulls the \(\hat{\beta }\)s in the opposite direction of the centripetal forces originating from the high wage in the cbd. According to the “Compact” curve in Fig. 6, this second force dominates more in a compact system than in the benchmark scenario. The situation is the reverse for the more dispersed spatial configuration of towns. Even in this case, with long distances between the towns, some workers choose to commute and benefit from the high wages in the cbd. The observed pattern corresponds to a hypothesis that workers are not strongly deterred by distance in choosing an O-D combination.

The curves in Fig. 6 were interpreted to result from balancing the worker’s wish for a high wage and the benefit of avoiding commuting expenses. As a reasonable presumption, commuting will be higher in the compact system than in a system where the towns are more spread out in the geography. This a priori expectation is supported in Fig. 7a. A considerably higher number of workers are commuting towards the cbd in the compact system. In a case where the other towns are closer to the cbd, it follows from the LSD function in our model that their households will shop more in the cbd. Due to economies of scale and scope in shopping, local sector jobs will be more clustered in the cbd. This additional centripetal force explains this system’s high number of in-commuters to the cbd.

Fig. 7
figure 7

The proportion of workers who are working but not living in the cbd, and the proportion of workers who are living and working in the same town. A compact system of towns is compared to a more dispersed system, with longer distances between the towns

The clustering of local sector activities promotes commuting. However, as is evident from Fig. 6, this does not result in low \(\hat{\beta }\)s. The increased commuting towards the cbd is more than counteracted by the tendency to live and work in the same town. The compact system has a very polarized commuting pattern, with a strong tendency for the workers to commute towards the cbd or not. There is not much commuting between O-D combinations, which do not involve the cbd. This is more common in the more dispersed system, where many local sector jobs are located outside the cbd. As illustrated in Fig. 7b, the compact system has a substantially higher proportion of non-commuters than the more dispersed spatial pattern of towns. This reflects a tendency that the relatively few local sector jobs left outside the cbd are occupied by local workers. Despite their high commuting into the cbd, the workers in the compact system are more deterred by distance in their spatial labor market interaction. The percentage increase in commuting is lower than the 50% reduction in distances.

The relocation of local sector jobs causes a more imbalanced spatial system of jobs and housing. The variation in the job/housing ratio in an area influences commuting. This ratio is, in general, emphasized in the literature (see, for example, Sultana 2002; Schwanen et al. 2004; Lin et al. 2015; Kim and Choi 2019; Guo et al. 2020; Moos et al. 2018). This imbalance explains the tendency of increased commuting into the cbd illustrated in Figure 7a. In this case, however, the imbalance is due to relocating jobs to a centrally located town in a compact system. This does not induce much long-distance commuting, which would pull in the direction of a low \(\hat{\beta }\).

6 Endogeneity Issues and Testing for Parameter Stability

The experiments discussed in the previous sections, to some degree, represent a flawed explanation of how spatial structure aspects affect the distance deterrence parameter estimates. The agent-based model mirrors a real-world scenario, and the effects of an exogenous shock reflect complex patterns of interdependencies in a spatial general equilibrium context. This raises issues of endogeneity in the interpretation of results. A main issue in this respect is that changes in the spatial configuration of jobs and households can be expected to impact the local demand for housing and labor. The distance deterrence parameter represents the individual willingness to commute, which can be argued to be sensitive to spatial disparities in wages and housing prices. Hence, this line of reasoning raises a question of to what degree the differences in the estimates of the distance deterrence parameter are due to the changes in the spatial structure and the spatial disparities of wages and housing prices.

In the literature on causal inference, the direct acyclical graphical (DAG) is often useful in cases where the causality runs in one direction, for instance, forward in time (see, e.g., Cunningham 2021). The spatial structure (SS), represented by the location pattern of jobs and households, obviously has a direct impact on the commuting pattern (CP), which next determines the estimates of the distance deterrence parameter (DDP). The direction of the arrows in Fig. 8 represents hypotheses on the direction of causality. As illustrated by the DAG in the figure, housing prices (HP) and wages (W) act as confounders, representing indirect backdoor paths influencing the estimation of the DDP. The reasonable hypothesis is that changes in SS induce a quick response in HP and W, which further affects the CP and thereby introduces a bias in the estimation of how changes in SS affect the estimates of the DDP. This further means that we cannot even be sure that the direction of the estimated changes in the DDP when SS changes, is causal rather than just a correlation generated through the effects on HP and W. As mentioned, the DAG is based on the assumption that causality runs in one direction. This may, in fact, not be the case for all the arrows in Fig. 8. It can be argued that changes in HP and W affect SS through the location decisions of households and firms. If so, this is a case of reverse causality, calling for another approach than the DAG notation (Cunningham 2021). Still, it can also be argued that such effects are lagging in time, so the DAG in the figure is valid within a relatively short-term time perspective, representing causality running in one direction forward in time.

Fig. 8
figure 8

A direct acyclical graphical of the direct and indirect effects of changes in spatial structure on the estimates of the distance deterrence parameter

An obvious step to reach an unbiased, causal estimate of how changes in SS affect the DDP is to close the backdoor paths in Fig. 8. This is straightforward in our experimental design, not by controlling for HP and W, like in a regression approach, but by keeping the relative prices of housing and labor fixed throughout the experiment. All the pricing variables in the model are assigned the same yearly growth rate, ignoring the possibility that the local demand and supply conditions influence spatial wage and housing price disparities. This example of the agent-based approach provides opportunities to study counterfactual scenarios, examining the effects of exogenous shocks in cases where other variables are kept constant, like in a comparative static experiment. This section illustrates the effects of keeping relative prices constant by considering Case CBD, Case EVEN, and Case Bridge.

The dashed curve in Fig. 9 represents the estimates of the DDP in the case where town B rather than town E is the cbd of the geography, and the relative prices of houses and labor are kept fixed throughout the 50-year long period. By comparing with the curves in Fig. 2, it follows that closing the backdoor paths only leads to a relatively marginal change in the estimates of the DDP. It makes sense that the difference between the two curves in Fig. 9 increases over time since continuous changes in the location pattern tend to increase the potential for local adjustments in housing prices and wages. It also follows from comparing Figs. 9 and 2 that fixing relative prices contributes to increasing the differences in the DDP estimates between the scenarios with different cbd’s. In other words, adjusting for HP and W will, in this case, contribute to reducing the impact of changes in spatial structure on the DDP estimates. The increased concentration of jobs in the cbd (town B) induces a high local demand for labor and high local wages. Hence, town B becomes more attractive as a job location and residence, causing local housing prices to increase. These price changes tend to increase the attractiveness of living in a town relatively close to the cbd and, at the same time, working in the cbd. With households striving for such O-D combinations over time, we reach a commuting pattern involving shorter distances and lower total costs, corresponding to a higher estimate of the DDP than in the case with fixed relative HP and W. This corresponds to the pattern illustrated in Fig. 2.

Fig. 9
figure 9

Estimates of the DDP when all relative prices are fixed (the dashed curve) in Case CBD. The solid curve represents the case where spatial disparities in housing prices and wages reflect respond to market forces

Figure 10 illustrates the effect on the DDP estimates of fixing the relative prices of housing and labor in Case EVEN and Case BRIDGE. The results support the conclusions based on Case CBD in Fig. 2. The adjustments for the endogeneity issue result in relatively marginal changes in the DDP estimates, but for both cases, the divergence in DDP estimates increases over time. Once again, the experiments demonstrate that the flexibility in housing prices and wages contributes to a slightly higher estimate of the DDP, reflecting a commuting pattern with less long-distance commuting.

Fig. 10
figure 10

The upper solid line illustrates the DDP estimates in Case EVEN, while the lower solid line corresponds to Case BRIDGE. The dashed curves represent the corresponding experiments when relative prices, HP and W, are fixed

In all the cases considered above, differences in the DDP estimates are discussed without considering the statistical uncertainty involved. The standard deviation of the parameter estimates can measure the uncertainty. Figure 11 refers to the same experiment as Fig. 9, Case CBD. The only difference is that Fig. 11 for every year includes a 95% confidence band of the parameter estimates. The confidence bands are estimated by bootstrapping. This is an example where the confidence intervals are short (i.e., the bands are slim), and the estimated differences in the DDP parameter are significant and stable.

Fig. 11
figure 11

Estimates of the CCP in Case CBD, with confidence bands estimated by bootstrapping

7 Model Performance and Parameter Sensitivity of Making Predictions

In this section, we provide information on model performance and discuss how sensitive the predicted commuting flows are to the value of \(\hat{\beta }\) in the standard doubly constrained gravity model. Figure 12 offers information on the predicted number of workers commuting specific distances for different values of \(\beta\). In part a) of the figure, the values of \(\beta\) are deviating substantially from the entropy-maximizing value of \(\hat{\beta }\approx 0.016\). In part b) of the figure, the values are much closer to \(\hat{\beta }\approx 0.016\). Notice that the scaling for the vertical axis is different in the two parts of the figure. Considering this, it is evident from the figure that the values of \(\beta\) in the range close to 0.016 give a substantially better fit to the observations than the more extreme values in part a) of the figure.

Fig. 12
figure 12

Commuting flows from our benchmark agent-based scenario are compared to predicted commuting flows for different values of the distance deterrence parameter in the doubly-constrained gravity model

The prediction errors in Fig. 12a follow an expected pattern. Very high values of \(\beta\) correspond to a situation where the workers resist commuting long distances. Hence, it makes sense that the gravity model is overpredicting the number of non-commuters and is underpredicting the commuting over long distances where \(\beta =0.1\). This tendency is less pronounced for \(\beta =0.05\), while a value of \(\beta =0\) reflects a situation where the workers tend to be happy to be employed anywhere without considering distance as a barrier.

Part b of Fig. 12 illustrates that the predicted commuting flows are not very sensitive to minor deviations from the entropy-maximizing value of \(\beta\) but that there is still room for significant prediction errors. The prediction errors are, in particular, discernible for intraurban commuting, indicating that the standard doubly-constrained gravity model does not adequately account for the propensity of workers to live and work in the same town.

Table 2 offers more accurate information on the model performance for different values of \(\beta\). For this purpose, we use the standardized root mean square errors (SRMSE), recommended by Knudsen and Fotheringham (1986), as an accurate measure for a model’s performance to replicate a spatial system’s data set. The predicted commuting patterns are compared to those following the benchmark scenario for 65 years. It follows from Table 2 that the values of the SRMSE are not very sensitive to deviations from the entropy-maximizing value of \(\beta\). Still, we know from Fig. 12 that \(\beta =0.05\) gives a considerably poorer fit than values of \(\beta\) close to 0.016. Hence, an increase in SRMSE from 0.42 to 0.46 represents a substantially poorer fit to data, and a value of SRMSE close to 1, or even around 0.6, corresponds to a predicted commuting pattern fundamentally different from the observed pattern.

Table 2 The SRMSE of the standard doubly constrained gravity model for different values of \(\beta\). The observed O-D matrix is given by the benchmark scenario, year 65

The gravity model can, for example, be used to predict the impact on commuting flows if basic sector jobs are more evenly distributed across the geography or if a new bridge is connecting different areas. As demonstrated above, however, one major problem is that the distance deterrence parameter is not autonomous to such changes. If we use the value of \(\beta\) that was estimated from the ex-ante situation, then this will lead to a severely wrong prediction of the impact on commuting flows. An appropriate prediction model should account for relevant characteristics of, for example, the spatial structure. However, entering into a discussion of model extensions is beyond the scope of this paper.

For example, Wilson (2010) pointed out that a reduction in total commuting expenditures is equivalent to an increased value of the \(\beta\) parameter. This is reflected in Fig. 12. High values of \(\beta\) correspond to many non-commuters and not much commuting over long distances, while low values of \(\beta\) result in higher aggregate commuting expenditures.

The value of \(\beta\) is related to commuting tolerance, frequently used and discussed in the literature (see, for example, Clark et al. 2003), who indicate a tolerance level between 30 and 45 minutes). Identifying such a tolerance level for the system treated above is not straightforward. The system has a relatively low number of agents, with an irregular distribution of possible commuting distances. This irregularity partly reflects the topographical barrier that separates the geography into two areas. An unbalanced jobs/housing ratio between the two areas explains the demand for long-distance commuting, for example, 75 km. Hence, a smoothly falling curve cannot be expected. Still, Fig. 12 at least demonstrates that such a tolerance level will be negatively related to the value of \(\beta\).

The experiments run in this paper all tend to report lower values of \(\hat{\beta }\) than are usually reported in empirical studies of commuting flows. Based on commuting data from Norwegian regions and an exponential representation of distance in the model, Thorsen and Gitlesen (1998); Gitlesen and Thorsen (2000) and McArthur et al. (20112013) estimate values of \(\beta\) around 0.07. The experiments have demonstrated many possible explanations for the divergence between the benchmark agent-based commuting pattern and real-world observations. If the real world has

  • a more compact spatial structure, with a short distance between the central places

  • no barriers in the transportation network

  • a less centralized distribution of basic and local sector jobs,

we have seen that all these factors will pull in the direction of a commuting pattern corresponding to a higher value of the distance deterrence parameter.

8 Concluding Remarks

The agent-based experiments generated a population that, in a demographic sense, is very similar to the Norwegian. We used this experimental design as a consistent approach to discuss the interpretation of the distance deterrence parameter in a spatial interaction model and the stability of parameter estimates over different controlled experiments. The main contribution is demonstrating how these parameter estimates reflect spatial structure characteristics.

As mentioned in the introduction, the computer capacity was a limitation of this study. This prevented us from considering a larger system with more agents involved and prevented us from being more specific on issues related to centralization and urbanization. Different aspects of agglomeration economies and diseconomies are relevant for the trip distribution pattern and the estimates of the distance deterrence parameter. With improved computer capacity and a programming language that is more efficient in dealing with this kind of problem, the agent-based approach has the potential to consider systems of any size. This is left for future research.

Table 3 summarizes some aspects of the results. The estimates of \(\beta\) refer to the last year of the respective experiments. Some experiments ran for 50 years after the initialization, while others ran for 15 years after a shock was introduced in year 50. There is, of course, a risk that, in particular, the values of \(\beta\) taken from the latter experiments are still trending towards a new dynamic equilibrium level. It still follows from Table 3 that the parameter estimates vary considerably across the different experiments. The estimated effect of variations in distance is, in particular, sensitive to the compactness of the configuration of central places. However, they also respond significantly to changes in the transportation infrastructure and the centralization of local and basic sector jobs. To summarize, commuting is estimated to be much more deterred by distance in a compact system, with short distances between central places, no barriers in the transportation network, and a decentralized distribution of jobs.

Table 3 Parameter estimates, model performance, and the coefficient of variation (CV) of the jobs/housing (J/H) balance between the towns in different experiments

Hence, our experiments demonstrate that \(\hat{\beta }\) from a standard gravity model varies substantially with respect to the data-generating design. This raises an interpretational concern; \(\hat{\beta }\) from the standard gravity model is not an unbiased estimate of how variations in distance affect commuting. Another concern is related to the predictability. Assume the transportation network is changed by building a new bridge connecting the two areas separated by a topographical barrier. What parameter value should be used in predicting the induced commuting from a standard gravity model? As pointed out in Section 7, one problem is that the parameter is not autonomous to the change in the transportation network. However, the problem is that the standard doubly-constrained gravity model does not adequately represent the geography. Our experiments have demonstrated that the model specification should explicitly account for spatial structure characteristics. Integrating such variables adequately, the resulting modeling device will be more suitable for making reliable predictions.

Table 3 also provides information on the model performance (SRMSE). The standard doubly-constrained gravity model, in particular, fails to replicate commuting flows in a compact system with short distances between the towns. However, remember that this experiment has relatively sizeable spatial wage disparities, with around 15% higher wages in the cbd. This may not be a likely scenario in such a compact system. However, it nevertheless sorts out a possible scenario where the standard gravity model does not perform well to explain commuting flows. In such a case, the model strongly underpredicts the commuting flows into the cbd.

Finally, Table 3 offers information on spatial disparities in the Job/Housing (J/H) balance. A high value of the coefficient of variation (CV) reflects an unbalanced J/H distribution across the towns. It is well known in the literature that the commuting pattern depends on the local balance of employment and housing and that this leaves a potential for spatial planning policies to move the local economy into a more sustainable direction (see, for example, Schwanen et al. 2004; Lin et al. 2015; Kim and Choi 2019; Guo et al. 2020; Moos et al. 2018). This discussion is beyond the scope of this paper but notice at least from Table 3 that the case where town B is the cbd results in unbalanced systems, while case EVEN and case LSD are more balanced systems. In comparing these cases, the hypothesis is supported that unbalanced systems result in much commuting and lower values of \(\hat{\beta }\) than more balanced systems.

However, the evidence in Table 3 is not unambiguous. The compact system produces a very high clustering of local sector jobs towards the cbd. Hence, the system is strongly unbalanced in terms of J/H. The system has a high level of commuting, but the dominating part of this commuting involves the cbd, which is centrally located. Hence, the gravity model estimates a high \(\hat{\beta }\), an example that an unbalanced system does not necessarily lead to a low \(\hat{\beta }\).

Summarized, we think that the experiments presented in this paper have demonstrated that different spatial structure characteristics should be explicitly accounted for to obtain reliable, unbiased estimates of \(\beta\) in spatial labor market interaction. The results provide a valuable guideline for evaluating results in empirical studies. This applies, for instance, to interregional comparisons of commuting behavior and procedures related to predicting induced commuting and willingness to pay for investments in transportation infrastructure.