Exploratory data analysis for spatial interaction

Over the past two weeks I have worked on some exploratory tools for spatial interaction data. First, I have coded up a recently proposed spatial autocorrelation statistic for vectors. The statistic itself is a variation of Moran's I, though it requires unique randomization technqiues to carry out significance testing because the udnerlying distribution of vectors is unknown. The original paper put forth two randomization techniques, which I have tested here and which give very different results. More work will need to be done here to decide the best way to carry out hypothesis testing of the vector Moran's I.

I also created helper functions for the Gravity, Production, and Attraction classes, which carry out origin/destination specific gravity models so that local statistics and parameters can be obtained and mapped to explore potential non-stationarity in data-generating processes. In each case, the helper function is called local, thugh it works a bit differently for Gravity models, which can be origin-specific or destination-specific in comparion to constrained models which can only be either origin-specific or destination-specific. If a user tries to use the local function with a doubly-constrained model then they get a not implemented error since it is not possible to compute location-specific doubly constrained models due to a lack of degrees of freedom.

Looking forward, the next to weeks will focus on building functions to produce weighting functions that consider the spatial proximity of both origin and destintion neighbors, which will be useful or exploratory analysis and also for specifying autoregressive/spatial filter models.