Code Monkey home page Code Monkey logo

epimodelcovid's Introduction

EpiModel

CRAN Version Build Status Methods


Tools for simulating mathematical models of infectious disease dynamics. Epidemic model classes include deterministic compartmental models, stochastic individual-contact models, and stochastic network models. Network models use the robust statistical methods of exponential-family random graph models (ERGMs) from the Statnet suite of software packages in R. Standard templates for epidemic modeling include SI, SIR, and SIS disease types. EpiModel features an easy application programming interface (API) for extending these templates to address novel scientific research aims.

Lead Authors

Samuel M. Jenness Department of Epidemiology Emory University
Steven M. Goodreau Department of Anthropology University of Washington
Martina Morris Departments of Statistics and Sociology University of Washington
Adrien Le Guillou Department of Epidemiology Emory University
Chad Klumb Center for Studies in Demography and Ecology University of Washington

Additional contributors to EpiModel are listed on the contributors page.

Installation

The current release version can be found on CRAN and installed with:

install.packages("EpiModel", dependencies = TRUE)

To install this development version, use the remotes package:

if (!require("remotes")) install.packages("remotes")
remotes::install_github("EpiModel/EpiModel")

Documentation and Support

Website. The main website for EpiModel, with tutorials and other supporting files, is here: http://www.epimodel.org/.

Methods Paper. A good place to start learning about EpiModel is the main methods paper published in the Journal of Statistical Software. It is available at: https://doi.org/10.18637/jss.v084.i08.

Summer Course. Network Modeling for Epidemics is our annual 5-day course at the University of Washington where we teach the statistical theory, software tools, and applied modeling methods using EpiModel. Our course materials are open-source and updated annually around the time of the course.

Getting Help. Users are encouraged to use Github issues on this repository as a place to ask questions (both technical coding questions and conceptual modeling questions), report bugs, and request new features & functionality. Broader modeling questions can be posted on the Discussions board here.

The EpiModel Gallery

The EpiModel Gallery contains templates of extensions to EpiModel, for now focused on network-based mathematical modeling class. We will be continuing to add new examples the gallery, and encourage users to either file requests for new examples or else to contribute them directly.

Citation

If using EpiModel for teaching or research, please include a citation our main methods paper:

Jenness SM, Goodreau SM and Morris M. EpiModel: An R Package for Mathematical Modeling of Infectious Disease over Networks. Journal of Statistical Software. 2018; 84(8): 1-47. doi: 10.18637/jss.v084.i08

Please also send us an email if you have used EpiModel in your work so we can add the citation below.

Funding

The primary support for the development of these software tools and statistical methods has been by two National Institutes of Health (NIH) grants. Our applied research projects using EpiModel have received funding from the NIH and Centers for Disease Control and Prevention (CDC). Our team also receives institutional support through center-level NIH grants. A full list of our funding support can be found here.

EpiModel in the Scientific Literature

EpiModel and its extension packages have been used in the following scientific journal articles. A list of these articles can be accessed in a wiki page or on Zotero. (If you are aware of others, send us an email at [email protected] to be included in this list.)

Copyright

These materials are distributed under the GPL-3 license, with the following copyright and attribution requirements listed in the LICENSE document above.

epimodelcovid's People

Contributors

adrienleguillou avatar chad-klumb avatar karina-d-wallrafen avatar kristinharrington avatar smjenness avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

epimodelcovid's Issues

Mismatch in positional and unique IDs using get_partners() function

When filtering for eligible IDs for case investigation (e.g., status in c(a,ic,ip)), noticing that these are not always translating into the IDs being pulled by the get_partners() for the discordant edgelist.

For example: my idsEligCI are: 15, 657, 759, and 835. The index IDs in the discordant edgelist are 15, 659, 761, and 837. Seems like this is an issue with the positional versus unique IDs.

Relevant code for this issue: [https://github.com/EpiModel/EpiModelCOVID/blob/ContactTrace/R/mod-intervention.R]

Lines 27-28
idsEligCI <- which(active == 1 & status %in% c("a", "ic", "ip") & dxStatus == 2 & is.na(eligible.case))
Line 45
del_ct <- get_partners(dat, idsEligCI)

del$dx referenced but not set

In mod_infection.R, infect_covid_corporate() and infect_covid_contacttrace() reference del$dx but that variable is never set (it does not exist).

# Case isolation with diagnosed or symptomatic infection
        if (at >= act.rate.dx.inter.time) {
          del$actRate[del$dx == 2] <- del$actRate[del$dx == 2] *
                                      act.rate.dx.inter.rr
        }

Error in update_cumlative_edgelist with ContactTrace branch

Running the test script for Kristin's EpiModelCOVID, I am encountering this error:

	A ERROR occured in module 'initialize.FUN' at step `Initialization Step` (1)
Error: Can't recycle input of size 4 to size 5.
Run `rlang::last_error()` to see where the error occurred.

within update_cumlative_edgelist specifically at the line:

  terminated_edges <- is.na(el_cuml[["current"]]) & is.na(el_cuml[["stop"]])
  if (any(terminated_edges)) {
    el_cuml[terminated_edges, ][["stop"]] <- at - 1
  }

Relevant files for reproducing the error:

  1. Script: https://github.com/EpiModel/COVID-ContactTrace/blob/updatePackages/R/03-epi-model-calib.R (use this updatePackages branch for now)
  2. Package: https://github.com/EpiModel/EpiModelCOVID/tree/ContactTrace

Global function definitions

In running R CMD check on ContactTrace, we are getting this as a NOTE:

   resim_nets_covid_contacttrace: no visible global function definition
     for ‘%n%<-resim_nets_covid_contacttrace: no visible global function definition
     for ‘%n%’
   resim_nets_covid_contacttrace: no visible global function definition
     foras.edgelistresim_nets_covid_corporate: no visible global function definition for
     ‘%n%<-resim_nets_covid_corporate: no visible global function definition for
     ‘%n%’
   resim_nets_covid_corporate: no visible global function definition foras.edgelistresim_nets_covid_ship: no visible global function definition for
     ‘%n%<-resim_nets_covid_ship: no visible global function definition for ‘%n%’
   resim_nets_covid_ship: no visible global function definition foras.edgelistUndefined global functions or variables:
     %n% %n%<- as.edgelist layer

Is this something we get also with EpiModelHIV? Is it an issue with imports?

Looking for clarification on "discord_edgelist_covid_ship" function

Hello Sam,
This is Nisarg, part of the group adapting your cruise code for the hospital context. I was looking for your help to provide an insight into why "nw = 1" in line 221 of "mod-infection.R" , within the "discord_edgelist_covid_ship" function?

I noticed it did not seem to affect the outcome for the patient/ healthcare worker parameters (different parameter values for # of patients, health care workers & rooms compared to the cruise ship code) if I change it to "nw" or "nw=2" since the infection function is dependent on the network selected on the discordant edge.*

Thanks a lot for your help,
Nisarg

*edit: changing it to nw or nw=2 did have an effect on the cruise ship code. limiting the simulation output to both crew and passengers & only passengers respectively.

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.