Leeds-MRG / Minos

SIPHER Microsimulation for estimating the effect on Income policy on mental health.
MIT License
4 stars 3 forks source link

Minos

Minos is a dynamic microsimulation being developed to investigate (firstly) the pathways in which an improvement to a national living wage could affect mental health outcomes.

It is based on Icarus, which is another dynamic microsimulation model being developed as part of Robert Clay's PhD project, all being part of the SIPHER consortium's work on the design of policy for interventions in 'inclusive economies'.

See the Github pages for more information: https://leeds-mrg.github.io/Minos/

Docker images hosted on Dockerhub, including a readme for how to setup and use MINOS within the container: https://hub.docker.com/repository/docker/ldarcher/minos

Installation and quick start guide

Minos was developed in Python and R using a conda (i.e. Anaconda/Miniconda) environment. It has been tested with Python 3.9 and R 4.1.3. It is recommended that you follow the installation instructions below, which will install Minos in development mode. Minos has been developed and tested on Linux systems only, and compatibility with other operating systems can't be guaranteed.

  1. Clone this repository, ensuring you have git installed, to a location of your choice.

> git clone https://github.com/Leeds-MRG/Minos

  1. Download and unpack the Understanding Society dataset from the UK Data Service (UKDA) website here (more information here), for which you will need a UKDA account. Ensure you download the dataset in STATA format such that the folder is named UKDA-6614-stata. Understanding Society is a longitudinal study of UK households and is used as input data for Minos; more details here.

  2. Contact the developers to obtain the spatially disaggregated version of the Understanding Society data (in a folder called US_spatial_lookup) that will allow you to plot results produced by Minos. The resulting directory structure should look as it does below.

yourproject/
└─  Minos/
└─  UKDA-6614-stata/
└─  US_spatial_lookup/
  1. Create a conda environment in which to run Minos using the file provided, via the command below, noting that you may additionally specify a different environment than the default (minos_conda) using the -n/--name= flag. Then activate your environment with either source activate minos_conda or conda activate minos_conda, depending on your system.

    NOTE: GCC is now required to install rpy2, please ensure GCC is avaiable on your system, e.g. GCC can be installed to your conda base environment conda install -c conda-forge gcc

> conda env create -f environment.yml
  1. Navigate to the uppermost Minos folder. The following command will install Minos and all its dependencies. All replenishing and transition data necessary to run Minos will be generated, all of which are derived from the Understanding Society dataset. This may take several minutes. You will then be able to run any of the microsimulation scenarios provided.

> make setup

NOTE: Step 4 above can cause conflicts with conda R packages that are already installed and may require that some R packages be removed in the environment this is being installed from (e.g. base). A known issue is that R packages installed via install.packages() can cause conflicts with instances of the same packages installed via conda install. In this case, it is recommended that you try the following steps:

A. Uninstall the offending packages with remove.packages() and then, if necessary, uninstall and reinstall via conda uninstall and conda install.

B. Reset your base environment to an earlier state (see here, for example).

C. If you still encounter problems, we recommend you uninstall and reinstall Anaconda/Miniconda entirely to start from a fresh base environment.

Information, issues and contacts

Minos has been developed as part of the SIPHER Research Consortium (more information, including funding details, can be found here: https://sipher.ac.uk/), under Workstrand 5, "Policy Microsimulation".

If you find a bug in Minos please submit an issue here at Github. If you have any suggestions or questions, please contact one of the developers below.