Assessing Model Fit in Spatial Interaction Models

One issue with spatial interaction models is how to compare the fit of different models. This can be especially tricky in the realm of generalized linear models, where the R-squared value does not have the same interpretation as in an OLS regression. Even in the context of OLS regression, previous work suggests the best way to assess a set of models is via a combination of r-squared, standardized root mean sqaure error (SRMSE), and information-based statistics. In the vein, we I have added the SRMSE to the gravity classes. I have also added several proxies to the R-squared value, since we cannot use the standard R-sqaure. Frist, I added a pseudo R-squared (McFadden's variety), which is based on a camparison of a model's full likelihood to its null likelihood. In addition, there is also an adjusted version, which penalizes the measure for model complexity, which has been added to the gravity classes as well. I have also added a D-squared metric, which may be interpretted as the percentage of deviation accounted for by the model. It is essentially a ratio of the model deviance to the null deviance. This measure also has an adjusted version to account for model complexity. The D-squared metric was added to the GLM class, which is also passed to the gravity class. Finally, the Sorensen similarity index (SSI) was added to the gravity class. This index has become popular in the mobility and network science literature so it was added so that it can be used for comparing models but also against other metrics.