knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

covidscreen

CI-CD Codecov test coverage CRAN status

{covidscreen} is an R package and Shiny app designed to help organizations evaluate their risk from COVID-19 and the potential benefits of regular asymptomatic testing.

Installation

You can install the development version of {covidscreen} from Github with:

if (!"remotes" %in% installed.packages()) install.packages("remotes")
remotes::install_github("jesse-smith/covidscreen")

If you are using R on Windows, you will need to first install Rtools here.

Example

library(covidscreen)

To run the Shiny app, you can use run_app() or visit an online version.

To access the underlying model in R, you can use cs_dist() with the desired parameters. Running with no inputs uses the defaults; the output is a data.table:

# Create some data using default parameters
data <- cs_dist()

# Show data
data

You can access the risk-based metrics used in the Shiny app using corresponding functions in the R package. Undetected cases are calculated using cs_undetected(), relative risk reduction is calculated using cs_rr(), and cost effectiveness per test is calculated using cs_cost_eff().

# Cost effectiveness
cs_undetected(data)

# Relative risk reduction
cs_rr(data)

# Cost effectiveness
cs_cost_eff(data)

Additionally, test performance metrics are included in the R package to facilitate analysis not performed in the Shiny app. These include:

# Positive tests
cs_pos(data)

# Negative tests
cs_neg(data)

# True positives
cs_true_pos(data)

# True negatives
cs_true_neg(data)

# False positives
cs_false_pos(data)

# False negatives
cs_false_neg(data)

# Positive predictive value (precision)
cs_ppv(data)

# Negative predictive value
cs_npv(data)

# False discovery rate
cs_fdr(data)

# False omission rate
cs_for(data)

# True positive rate (sensitivity/recall)
cs_sens(data)

# True negative rate (specificity)
cs_spec(data)

# False positive rate
cs_fpr(data)

# False negative rate
cs_fnr(data)

Code of Conduct

Please note that the {covidscreen} project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.



jesse-smith/covidscreen documentation built on June 15, 2022, 7:46 p.m.