SEIRfansy
Extended Susceptible-Exposed-Infected-Recovery (SEIR) Model for handling high False Negative Rate and Symptom based administration of diagnostic tests
Science Score: 23.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
✓DOI references
Found 4 DOI reference(s) in README -
○Academic publication links
-
✓Committers with academic emails
1 of 2 committers (50.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.6%) to scientific vocabulary
Last synced: 11 months ago
·
JSON representation
Repository
Extended Susceptible-Exposed-Infected-Recovery (SEIR) Model for handling high False Negative Rate and Symptom based administration of diagnostic tests
Basic Info
- Host: GitHub
- Owner: umich-biostatistics
- Language: R
- Default Branch: master
- Size: 1010 KB
Statistics
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 1
- Releases: 0
Created almost 6 years ago
· Last pushed almost 5 years ago
Metadata Files
Readme
README.Rmd
---
output: github_document
---
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures"
)
```
# R package `SEIRfansy`
# Extended Susceptible-Exposed-Infected-Recovery Model
`r badger::badge_devel("umich-biostatistics/SEIRfansy", "blue")` `r badger::badge_code_size("umich-biostatistics/SEIRfansy")`
`r badger::badge_doi("https://doi.org/10.1101/2020.09.24.20200238", "orange") `
## Overview
This `R` package fits Extended Susceptible-Exposed-Infected-Recovery (SEIR) Models for handling high false negative rate and symptom based administration of diagnostic tests.
## Installation
If the devtools package is not yet installed, install it first:
```{r, eval=FALSE}
install.packages('devtools')
```
```{r, eval = FALSE}
# install SEIRfansy from Github:
devtools::install_github('umich-biostatistics/SEIRfansy')
```
Once installed, load the package:
```{r, eval = TRUE}
library(SEIRfansy)
```
## Example Usage
For this example, we use the built-in package data set `covid19`, which contains dailies and totals of cases, recoveries, and deaths from the COVID-19 outbreak in India from January 30 to September 21 of 2020.
### Setup
You will need the `dplyr` package for this example.
```{r, eval = TRUE}
library(dplyr)
```
Training data set:
For training data, we use cases from April 1 to June 30
```{r, eval = TRUE}
train = covid19[which(covid19$Date == "01 April "):which(covid19$Date == "30 June "),]
```
Testing data set:
For testing data, we use cases from July 1 to July 31
```{r, eval = TRUE}
test = covid19[which(covid19$Date == "01 July "):which(covid19$Date == "31 July "),]
```
Data format for multinomial and Poisson distribution:
```{r, eval = TRUE}
train_multinom =
train %>%
rename(Confirmed = Daily.Confirmed,
Recovered = Daily.Recovered,
Deceased = Daily.Deceased) %>%
dplyr::select(Confirmed, Recovered, Deceased)
test_multinom =
test %>%
rename(Confirmed = Daily.Confirmed,
Recovered = Daily.Recovered,
Deceased = Daily.Deceased) %>%
dplyr::select(Confirmed, Recovered, Deceased)
train_pois =
train %>%
rename(Confirmed = Daily.Confirmed) %>%
dplyr::select(Confirmed)
```
Initialize parameters:
```{r, eval = TRUE}
N = 1341e6 # population size of India
data_initial = c(2059, 169, 58, 424, 9, 11)
pars_start = c(c(1,0.8,0.6,0.4,0.2), c(0.2,0.2,0.2,0.25,0.2))
phases = c(1,15,34,48,62)
```
## SEIRfansy()
If interest is in model estimation but not prediction, then use `SEIRfansy()`. Otherwise, use `SEIRfansy.predict()` (see below).
```{r, eval = FALSE}
?SEIRfansy
```
```{r, eval = TRUE}
cov19est = SEIRfansy(data = train_multinom, init_pars = pars_start,
data_init = data_initial, niter = 1e3, BurnIn = 1e2,
model = "Multinomial", N = N, lambda = 1/(69.416 * 365),
mu = 1/(69.416 * 365), period_start = phases, opt_num = 1,
auto.initialize = TRUE, f = 0.15)
```
Inspect the results:
```{r, eval = FALSE}
names(cov19est)
class(cov19est$mcmc_pars)
names(cov19est$plots)
```
Plot the results:
```{r, eval = TRUE}
plot(cov19est, type = "trace")
plot(cov19est, type = "boxplot")
```
## SEIRfansy.predict()
If interest is in model estimation and prediction, then use `SEIRfansy.predict()`, which first runs `SEIRfansy()` internally, and then predicts.
```{r, eval = FALSE}
?SEIRfansy.predict
```
```{r, eval = TRUE}
cov19pred = SEIRfansy.predict(data = train_multinom, init_pars = pars_start,
data_init = data_initial, T_predict = 60, niter = 1e3,
BurnIn = 1e2, data_test = test_multinom, model = "Multinomial",
N = N, lambda = 1/(69.416 * 365), mu = 1/(69.416 * 365),
period_start = phases, opt_num = 1,
auto.initialize = TRUE, f = 0.15)
```
Inspect the results:
```{r, eval = FALSE}
names(cov19pred)
class(cov19pred$prediction)
class(cov19pred$mcmc_pars)
names(cov19pred$plots)
```
Plot the results:
```{r, eval = TRUE}
plot(cov19pred, type = "trace")
plot(cov19pred, type = "boxplot")
plot(cov19pred, type = "panel")
plot(cov19pred, type = "cases")
```
### Current Suggested Citation
Ritwik Bhaduri, Ritoban Kundu, Soumik Purkayastha, Mike Kleinsasser, Lauren J Beesley, Bhramar Mukherjee. "EXTENDING THE SUSCEPTIBLE-EXPOSED-INFECTED-REMOVED(SEIR) MODEL TO HANDLE THE HIGH FALSE NEGATIVE RATE AND SYMPTOM-BASED ADMINISTRATION OF COVID-19 DIAGNOSTIC TESTS: SEIR-fansy." medRxiv 2020.09.24.20200238; doi: https://doi.org/10.1101/2020.09.24.20200238
Owner
- Name: Department of Biostatistics at the University of Michigan
- Login: umich-biostatistics
- Kind: organization
- Location: Ann Arbor, Michigan
- Website: https://sph.umich.edu/biostat/index.html
- Repositories: 10
- Profile: https://github.com/umich-biostatistics
GitHub Events
Total
Last Year
Committers
Last synced: almost 3 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| Michael (Mike) Kleinsasser | 3****a | 36 |
| Michael Kleinsasser | m****a@u****u | 1 |
Committer Domains (Top 20 + Academic)
umich.edu: 1
Issues and Pull Requests
Last synced: almost 2 years ago
All Time
- Total issues: 1
- Total pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: less than a minute
- Total issue authors: 1
- Total pull request authors: 1
- Average comments per issue: 1.0
- Average comments per pull request: 0.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- ZachChen213 (1)
Pull Request Authors
- mkleinsa (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 149 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 2
- Total maintainers: 1
cran.r-project.org: SEIRfansy
Extended Susceptible-Exposed-Infected-Recovery Model
- Homepage: https://github.com/umich-biostatistics/SEIRfansy
- Documentation: http://cran.r-project.org/web/packages/SEIRfansy/SEIRfansy.pdf
- License: GPL-2
-
Latest release: 1.1.1
published almost 5 years ago
Rankings
Forks count: 21.9%
Stargazers count: 28.5%
Dependent packages count: 29.8%
Dependent repos count: 35.5%
Average: 38.0%
Downloads: 74.6%
Maintainers (1)
Last synced:
11 months ago
Dependencies
DESCRIPTION
cran
- R >= 3.5.0 depends
- DescTools * imports
- arm * imports
- dplyr * imports
- ggplot2 * imports
- ggpubr * imports
- knitr * imports
- magrittr * imports
- patchwork * imports
- pbapply * imports
- rlang * imports
- scales * imports