Skip to main content

Fit spatial multilevel models and diagnose convergence

Project description

This is a package to estimate spatially-correlated variance components models/varying intercept models. In addition to a general toolkit to conduct Gibbs sampling in Python, the package also provides an interface to PyMC3 and CODA. For a complete overview, consult the walkthrough.

author: Levi John Wolf


institution: University of Bristol & University of Chicago Center for Spatial Data Science

preprint: on the Open Science Framework


This package works best in Python 3.5, but unittests pass in Python 2.7 as well. Only Python 3.5+ is officially supported.

To install, first install the Anaconda Python Distribution from Continuum Analytics. Installation of the package has been tested in Windows (10, 8, 7) Mac OSX (10.8+) and Linux using Anaconda 4.2.0, with Python version 3.5.

Once Anaconda is installed, spvcm can be installed using pip, the Python Package Manager.

pip install spvcm

To install this from source, one can also navigate to the source directory and use:

pip install ./

which will install the package from the target source directory.


To use the package, start up a Python interpreter and run: import spvcm.api as spvcm

Then, many differnet variance components model specificaions are available in:

spvcm.both spvcm.upper spvcm.lower

For more thorough directions, consult the Jupyter Notebook, using the sampler.ipynb, which is provided in the spvcm/examples directory.


Levi John Wolf. (2016). Gibbs Sampling for a class of spatially-correlated variance components models. University of Chicago Center for Spatial Data Science Technical Report.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for spvcm, version 0.2.1.post1
Filename, size File type Python version Upload date Hashes
Filename, size spvcm-0.2.1.post1.tar.gz (6.2 MB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page