derive_logdet_calculator: A function to compute the Jacobean term in the spatial...

View source: R/spflow_logdet.R

derive_logdet_calculatorR Documentation

A function to compute the Jacobean term in the spatial econometric interaction model

Description

These are internal functions called within the estimation procedure

Usage

derive_logdet_calculator(
  OW,
  DW,
  n_o,
  n_d,
  model,
  approx_order,
  is_cartesian,
  M_indicator
)

derive_approxldet_cartesian(OW, DW, n_o, n_d, model, approx_order)

derive_approxldet_cartesian2(OW, DW, n_o, n_d, model) # order = 2

derive_approxldet_noncartesian(Wd, Wo, Ww, approx_order, model)

derive_approxldet_noncartesian2(OW, DW, M_indicator, n_o, n_d, model) # order = 2

tracevals2params_cartesian(OW, DW, n_o, n_d, model, approx_order)

tracevals2params_noncartesian(Wd, Wo, Ww, model, approx_order)

trace_template_noncartesian()

tracevals2approxldet(tracevals)

Details

The Jacobean term of the model corresponds to the log-determinant of the spatial filter matrix, which is costly to compute. To reduce the computational burden of the MLE or MCMC estimators the package uses a power-series approximation of this term. This approximation was first proposed by \insertCiteMartin1992;textualspflow, has been adapted to interaction models by \insertCiteLeSage2008;textualspflow and \insertCiteDargel2023;textualspflow extend the approximation to the non-cartesian and rectangular cases, where the OD-matrix can be sparse and where the list of origins may be different from the list of destinations.

By using this approximation we can avoid to directly calculate the determinant term. Moreover, it is possible to factor out the autoregression parameters from all remaining terms, which means that we do not need to repeat the most costly computations.

Value

A function that takes the autoregression parameters as an argument and returns the log-determinant value

Author(s)

Lukas Dargel

References

\insertAllCited

LukeCe/spflow documentation built on Nov. 11, 2023, 8:20 p.m.