Coder Social home page Coder Social logo

asclepius's Introduction

asclepius

{asclepius} was created to perform agent based modeling of infectious disease transmission dynamics. The design has been to provide a set of tools to epidemiologists and public health data scientists to simulate various types of infectious diseases across varying populations and interventions/events. Components of the agent based modeling starts with modular building blocks. A Population is created using various demographics and a specified contact pattern for the transmission network. A Disease is created with various characteristics of interest such as infectiousness and latent period. These objects are then used to run_simulations of a specified interval, replication, and transmission pattern (e.g. SI, SIR, SEIR, etc).

Although {asclepius} attempts to make agent based models easy to perform, it should be used with caution and is not recommended nor encouraged to be used as the primary tool for creating evidence-based public health decisions.

Installation

You can install the development version of asclepius from GitHub only:

remotes::install_github('al-obrien/asclepius')

Functionality

  1. Modular components to simulate disease transmission

    • Create populations of specific size, demographics, and contact structure

    • Create a disease of defined base transmission probability and latent period

  2. Simulate disease transmission across specified contact structure for defined time period and number of replications.

    • Plot values for aggregate agent states over time and networks of a specific replication

    • Specify the particular disease transmission pattern (e.g. SI, SIR, SEIR)

Example

This is a basic example which shows you how to solve a common problem:

# Load the package!
library(asclepius)

# Create population of 50 people with gender and age values
sim_pop <- create_population(50) 
sim_pop <- set_age(sim_pop, range = c(1:100))
sim_pop <- set_gender(sim_pop, range = c('M','F'))

# Create contact network
sim_pop <- set_contacts(pop_obj = sim_pop,
                        range = c(0,5),
                        vars = c('age_structure', 'gender_structure'),
                        mu = 0.33, variance = .001,
                        progress = FALSE)

# Create disease with an infectious period of 7 days on average, with sterilizing immunity
sim_dis <- create_disease(inf_prob = 0.15, inf_p = 7, conv_p = Inf)

sim_1 <- run_simulation(Population = sim_pop,
                        Disease = sim_dis,
                        timesteps = 50,
                        init_inf = 5,
                        replications = 10,
                        transition_model = 'SIR')

plot(sim_1)

Development

{asclepius} has many planned features including:

  • Expand flexibility/customizability of network creation, allowing more rule checks and multi-modal distributions for contact patterns

  • Add dynamic exit, entry, and reshuffling of population and contact network (randomly or based on characteristics), including migration, births, and deaths.

  • Custom and additional package-provided transition models

  • Additional methods to create and extract S4 class object values Fit to data

  • Add events like vaccination programs and health measures/interventions Non-exponential transitions

  • Add various options for fitting procedures, including multiple objective optimization (to fit multiple end states) and various loss functions; better handling of fitting on mixed continuous and discrete parameters with defined boundaries, perhaps through transformations.

asclepius's People

Contributors

al-obrien avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.