Metadata-Version: 2.1
Name: dismod-mr
Version: 1.1.1
Summary: Integrative Meta-Regression Framework for Descriptive Epidemmiology
Home-page: https://github.com/ihmeuw/dismod_mr
Author: Abraham D. Flaxman
Author-email: abie@uw.edu
License: GNU GPLv3
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Natural Language :: English
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: POSIX
Classifier: Operating System :: POSIX :: BSD
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Education
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
Classifier: Topic :: Software Development :: Libraries
License-File: LICENSE
Requires-Dist: numpy (>=1.7.1)
Requires-Dist: scipy (>=0.12.0)
Requires-Dist: pymc (==2.3.8)
Requires-Dist: networkx (==2.3)
Requires-Dist: pandas (<1.1,>=0.23.4)
Requires-Dist: numba (==0.51.0)
Requires-Dist: matplotlib (<3.3)

.. image:: https://travis-ci.org/ihmeuw/dismod_mr.svg?branch=master
    :target: https://travis-ci.org/ihmeuw/dismod_mr
    :alt: Latest Version

This project is the descriptive epidemiological meta-regression tool,
DisMod-MR, which grew out of the Global Burden of Disease (GBD) Study
2010.  DisMod-MR has been developed for the Institute of Health
Metrics and Evaluation at the University of Washington from 2008-2013.

.. contents::

Examples
--------

`A motivating example: descriptive epidemiological meta-regression of Parkinson's Disease <http://nbviewer.ipython.org/github/ihmeuw/dismod_mr/blob/master/examples/pd_sim_data.ipynb>`_

`All examples <http://nbviewer.ipython.org/github/ihmeuw/dismod_mr/tree/master/examples/>`_

Installation
------------

Dismod MR requires PyMC2 which does not play nicely with normal Python
installation tools.  Fortunately, ``conda`` has solved this issue for us.
So first you'll need to setup a conda environment
(after `installing conda, if necessary <https://docs.conda.io/projects/conda/en/latest/user-guide/install/>`_)
and install ``pymc`` version ``2.3.8``.  Then you can install ``dismod_mr`` using ``pip``.

.. code-block:: sh

   conda create --name=dismod_mr python=3.6 pymc==2.3.8
   conda activate dismod_mr
   pip install dismod_mr

If you get an error stating

.. code-block:: sh

   ERROR: Complete output from command python setup.py egg_info:
   ERROR: Traceback (most recent call last):
     File "<string>", line 1, in <module>
     File "/tmp/pip-install-d9fbq7v3/pymc/setup.py", line 8, in <module>
       from numpy.distutils.misc_util import Configuration
   ModuleNotFoundError: No module named 'numpy'
   ----------------------------------------
   ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-d9fbq7v3/pymc/

or something similar, you do not have ``pymc`` properly installed.


Installing from source
++++++++++++++++++++++

If you want to install ``dismod_mr`` locally in an editable mode, the
instructions are very similar.  We'll clone the repository and install it
from a local directory instead of using ``pip`` to grab it from the Python
package index.

.. code-block:: sh

   conda create --name=dismod_mr python=3.6 pymc==2.3.8
   conda activate dismod_mr
   git clone git@github.com:ihmeuw/dismod_mr.git
   cd dismod_mr
   pip install -e .

To test this, you can use ``pytest``, which you must first install.

.. code-block:: sh

   pip install pytest
   pytest

If you have things setup right, this will still generate many
warnings, but there should be no tests that produce failures or
errors.

Coding Practices
----------------

* Write tests before code
* Write equations before tests

* Test quantitatively with simulation data
* Test qualitatively with real data
* Automate tests

* Use a package instead of DIY
* Test the package

* Optimize code later
* Optimize code for readability before speed

* `.py` files should be short, less than 500 lines
* Functions should be short, less than 25 lines
