This function creates a list to fine tune the estimation of a spatial interaction model with spflow(). The options allow to adjust the estimation method and give the user full control over the use of the explanatory variables. The user can also adjust the form of autocorrelation to be considered.

spflow_control(
  estimation_method = "mle",
  model = "model_9",
  use_intra = TRUE,
  sdm_variables = "same",
  weight_variable = NULL,
  parameter_space = "approx",
  loglik_det_aprox_order = 10,
  mle_hessian_method = "mixed",
  mle_optim_limit = 100,
  twosls_instrumental_variables = "same",
  twosls_decorrelate_instruments = FALSE,
  twosls_reduce_pair_instruments = TRUE,
  mcmc_iterations = 5500,
  mcmc_burn_in = 2500,
  mcmc_resampling_limit = 100
)

Arguments

estimation_method

A character which indicates the estimation method, should be one of c("mle","s2sls","mcmc")

model

A character indicating the model number, indicating different spatial dependence structures (see documentation for details), should be one of paste0("model_", 1:9)

use_intra

A logical which activates the option to use a separate set of parameters for intra-regional flows (origin == destination)

sdm_variables

Either a formula or a character; the formula can be used to explicitly declare the variables in SDM specification, the character should be one of c("same", "all") which are short cuts for using all available variables or the same as used in the main formula provided to spflow()

weight_variable

A character indicating the name of one column in the node pair data.

parameter_space

A character indicating how to define the limits of the parameter space. The only available option is c("approx").

loglik_det_aprox_order

A numeric indicating the order of the Taylor expansion used to approximate the value of the log-determinant term.

mle_hessian_method

A character which indicates the method for Hessian calculation

mle_optim_limit

A numeric indicating the number of trials given to the optimizer of the likelihood function. A trial refers to a new initiation of the optimization procedure using different (random) starting values for the parameters. If the optimizer does not converge after the indicated number of trails an error will be thrown after this limit.

twosls_instrumental_variables

Either a formula or a character; the formula can be used to explicitly declare the variables that should be used as instruments during S2SLS estimation, the character should be one of c("same", "all") which are short cuts for using all available variables or the same as used in the main formula provided to spflow()

twosls_decorrelate_instruments

A logical whether to perform a PCA to remove (linear) correlation from the instruments generated for the S2SLS estimator

twosls_reduce_pair_instruments

A logical that indicates whether the number of instruments that are derived from pair attributes should be reduced or not. The default is TRUE, because constructing these instruments is often the most demanding part of the estimation (Dargel 2021) .

mcmc_iterations

A numeric indicating the number of iterations

mcmc_burn_in

A numeric indicating the length of the burn in period

mcmc_resampling_limit

A numeric indicating the maximal number of trials during rejection sampling of the autoregressive parameters

Value

A list of parameters used to control the model estimation with spflow()

Details

Adjusting the form of autocorrelation

The option model allows to declare one of nine different forms of autocorrelation that follow the naming convention of LeSage and Pace (2008) . The most general specification is "model_9", leading to the model \(y = \rho_dW_dy + \rho_o W_oy + \rho_wW_wy + Z\delta + \epsilon\). All other models special cases of this one. The constraints that lead to the different sub models are summarized in this table.

Model NumberAutocorrelation ParametersConstraints
Model 9\(\rho_d, \rho_o, \rho_w\)unconstrained
Model 8\(\rho_d, \rho_o, \rho_w\)\(\rho_w = - \rho_d \rho_o\)
Model 7\(\rho_d, \rho_o\)\(\rho_w = 0\)
Model 6\(\rho_{dow}\)\(\rho_d = \rho_o = \rho_w\)
Model 5\(\rho_{do}\)\(\rho_d = \rho_o, \rho_w = 0\)
Model 4\(\rho_w\)\(\rho_d = \rho_o = 0\)
Model 3\(\rho_o\)\(\rho_d = \rho_w = 0\)
Model 2\(\rho_d\)\(\rho_o = \rho_w = 0\)
Model 1none\(\rho_d = \rho_o = \rho_w = 0\)

References

Dargel L (2021). “Revisiting Estimation Methods for Spatial Econometric Interaction Models.” Toulouse School of Economics.

LeSage JP, Pace RK (2008). “Spatial Econometric Modeling of Origin-Destination Flows.” Journal of Regional Science, 941--967.

See also

Examples

# default is MLE estimation of the most comprehensive model default_control <- spflow_control() # change the estimation method custom_control <- spflow_control(estimation_method = "mcmc") # change the form of autocorrelation to be considered custom_control <- spflow_control(model = "model_7") # declare precisely which variables are to be used in the SDM form custom_control <- spflow_control(sdm_variables = ~ O_(v1 + v2) + D_(v2 + v3) + I_(v1 + v4)) # deactivate the intra-regional coefficients and SDM variables custom_control <- spflow_control(use_intra = FALSE, sdm_variables = "none")