SPatial INTeraction models (SPINT)
Installation¶
spint supports python 3.5 and 3.6 only. Please make sure that you are operating in a python 3 environment.
Installing released version¶
spint is available on the Python Package Index. Therefore, you can either install directly with pip from the command line:
pip install -U spint
or download the source distribution (.tar.gz) and decompress it to your selected destination. Open a command shell and navigate to the decompressed folder. Type:
pip install .
Installing development version¶
Potentially, you might want to use the newest features in the development version of spint on github - pysal/spint while have not been incorporated in the Pypi released version. You can achieve that by installing pysal/spint by running the following from a command shell:
pip install https://github.com/pysal/spint/archive/master.zip
You can also fork the pysal/spint repo and create a local clone of your fork. By making changes to your local clone and submitting a pull request to pysal/spint, you can contribute to the mgwr development.
API reference¶
Gravity-type spatial interaction models¶
|
Base class to set up gravity-type spatial interaction models and dispatch estimaton technqiues. |
|
Unconstrained (traditional gravity) gravity-type spatial interaction model |
|
Production-constrained (origin-constrained) gravity-type spatial interaction model |
|
Attraction-constrained (destination-constrained) gravity-type spatial interaction model |
|
Doubly-constrained gravity-type spatial interaction model |
Tests for overdispersion¶
|
Test the hypothesis that var[y] = mu (equidispersion) against the alternative hypothesis that var[y] = mu + alpha * alt_var(mu) where mu is the expected value of y, alpha is an estimated coefficient, and alt_var() specifies an alternative variance as a function of mu. |
|
Test the hypothesis that var[y] = mu (equidispersion) against the alternative hypothesis (quasi-Poisson) that var[y] = phi * mu where mu is the expected value of y and phi is an estimated overdispersion coefficient which is equivalent to 1+alpha in the alternative alpha dispersion test. |