]> nmode's Git Repositories - Rnaught/blob - vignettes/Rnaught.Rmd
Update about.html
[Rnaught] / vignettes / Rnaught.Rmd
1 ---
2 title: "Introduction to Rnaught"
3 output: rmarkdown::html_vignette
4 vignette: >
5 %\VignetteIndexEntry{Introduction to Rnaught}
6 %\VignetteEngine{knitr::rmarkdown}
7 %\VignetteEncoding{UTF-8}
8 ---
9
10 ```{r, include = FALSE}
11 knitr::opts_chunk$set(
12 collapse = TRUE,
13 comment = "#>"
14 )
15 ```
16
17 The goal of Rnaught is to provide a collection of methods for estimating the
18 [basic reproduction number](
19 https://en.wikipedia.org/wiki/Basic_reproduction_number) ($R_0$) of infectious
20 diseases.
21
22
23 ## Estimators
24
25 The following estimators are currently available:
26
27 * `id()`: Incidence Decay (ID)
28 * `idea()`: Incidence Decay and Exponential Adjustment (IDEA)
29 * `seq_bayes()`: Sequential Bayes (seqB)
30 * `wp()`: White and Pagano (WP)
31
32 Every estimator employs its own model, has its own set of parameters, and is
33 better suited to particular scenarios. You should consult each method's
34 documentation for technical details. Below is a short example computing
35 estimates for a given set of case counts.
36
37 ```{r}
38 library(Rnaught)
39
40 # Weekly case counts.
41 cases <- c(1, 4, 10, 5, 3, 4, 19, 3, 3, 14, 4)
42
43 # Compute estimates of R0, assuming a serial interval of five days.
44 mu <- 5 / 7
45
46 id(cases, mu)
47 idea(cases, mu)
48 seq_bayes(cases, mu)
49 wp(cases, mu)
50 ```
51
52
53 ## Web Application
54
55 This serves as a graphical interface for the package. An instance is available
56 at <https://immune.math.yorku.ca/Rnaught>. It can also be run locally by
57 invoking the `web()` function.
58
59 Datasets can be uploaded as a CSV file, or entered manually. The data is
60 visualized in the application through plots that show the case counts (either
61 daily or weekly). If multiple datasets are added, the trends corresponding to
62 these datasets are populated in the same plot. This plot can be exported as a
63 PNG image. Furthermore, the datasets entered can be exported as a CSV.
64
65 Two sample datasets are included: weekly Canadian COVID-19 case count data from
66 March 3rd, 2020 to March 31st, 2020, and weekly Ontario COVID-19 case count data
67 from March 3rd, 2020 to March 31st, 2020.
68
69 To estimate the basic reproductive number, the user can choose their preferred
70 estimator, and if applicable, must enter the known
71 [serial interval](https://en.wikipedia.org/wiki/Serial_interval) prior to
72 estimation. If multiple estimates of the basic reproductive number are
73 calculated, they are all included in a table where each row represents an
74 estimate. If multiple datasets are being considered, the basic reproduction
75 number is estimated for all datasets and the columns of the table correspond to
76 the different datasets. The table also consists of a column corresponding to the
77 value of the serial interval. This table can also be exported as a CSV.
78
79
80 ## Datasets
81
82 The package includes two datasets provided by the [COVID-19 Canada Open Data
83 Working Group](https://github.com/ccodwg/CovidTimelineCanada).
84 These report the national and provincial case counts of COVID-19 in Canada. For
85 details, see `?COVIDCanada` and `?COVIDCanadaPT`. They are also available as
86 [CSV files](https://github.com/MI2YorkU/Rnaught/tree/master/inst/extdata).