Git Product home page Git Product logo

asymptor's Introduction

asymptor

CRAN status R build status Lifecycle: maturing Codecov test coverage

The asymptor R package allows you to estimate the lower and upper bound of asymptomatic cases in an epidemic using the capture/recapture methods from Böhning et al. (2020) and Rocchetti et al. (2020).

Please note there is currently some discussion about the validity of the methods implemented in this package. You should read carefully the original articles, alongside this answer from Li et al. (2022) before using this package in your project.

Installation

You can install the stable version of this package from CRAN:

install.packages("asymptor")

or the development version from GitHub, via my r-universe:

install.packages("asymptor", repos = "https://bisaloo.r-universe.dev")

Example

Let’s start by loading some example data from the COVID-19 epidemic in Italy:

d <- readRDS(system.file("extdata", "covid19_italy.rds", package = "asymptor"))
head(d)
#>         date new_cases new_deaths
#> 1 2020-01-02         0          0
#> 2 2020-01-03         0          0
#> 3 2020-01-04         0          0
#> 4 2020-01-05         0          0
#> 5 2020-01-06         0          0
#> 6 2020-01-07         0          0

We can estimate the lower and upper bound of asymptomatic cases with:

library(asymptor)
estimate_asympto(d$date, d$new_cases, d$new_deaths)

Or, with a tidyverse-compatible syntax:

library(dplyr)
d %>%
  mutate(asympto_cases = estimate_asympto(date, new_cases, new_deaths))

Please refer to the vignette for a detailed example using the COVID-19 data from Italy.

example_figure

asymptor's People

Contributors

actions-user avatar bisaloo avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

nmarkgraf

asymptor's Issues

Release asymptor 1.1.0

Prepare for release:

  • git pull
  • Check current CRAN check results
  • Check if any deprecation processes should be advanced, as described in Gradual deprecation
  • Polish NEWS
  • urlchecker::url_check()
  • devtools::build_readme()
  • devtools::check(remote = TRUE, manual = TRUE)
  • devtools::check_win_devel()
  • rhub::check_for_cran()
  • revdepcheck::revdep_check(num_workers = 4)
  • Update cran-comments.md
  • git push
  • Draft blog post

Submit to CRAN:

  • usethis::use_version('minor')
  • devtools::submit_cran()
  • Approve email

Wait for CRAN...

  • Accepted 🎉
  • git push
  • usethis::use_github_release()
  • usethis::use_dev_version()
  • git push
  • Finish blog post
  • Tweet
  • Add link to blog post in pkgdown news menu

Add na.action argument

Currently, NA values are automatically set to 0 but users might decide to do something else with them.

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.