]> nmode's Git Repositories - Rnaught/blob - articles/Rnaught.html
Deploying to gh-pages from @ MI2YorkU/Rnaught@9f3cbff9f95ea9235325a5ef7bfbb45121bbbee6 🚀
[Rnaught] / articles / Rnaught.html
1 <!DOCTYPE html>
2 <!-- Generated by pkgdown: do not edit by hand --><html lang="en">
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <meta charset="utf-8">
6 <meta http-equiv="X-UA-Compatible" content="IE=edge">
7 <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
8 <title>Introduction to Rnaught • Rnaught</title>
9 <!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
10 <link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png">
11 <link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png">
12 <link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png">
13 <link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png">
14 <link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png">
15 <script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
16 <link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet">
17 <script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet">
18 <link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet">
19 <script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Introduction to Rnaught">
20 </head>
21 <body>
22 <a href="#main" class="visually-hidden-focusable">Skip to contents</a>
23
24
25 <nav class="navbar navbar-expand-lg fixed-top bg-light" data-bs-theme="light" aria-label="Site navigation"><div class="container">
26
27 <a class="navbar-brand me-2" href="../index.html">Rnaught</a>
28
29 <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.1.0</small>
30
31
32 <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
33 <span class="navbar-toggler-icon"></span>
34 </button>
35
36 <div id="navbar" class="collapse navbar-collapse ms-3">
37 <ul class="navbar-nav me-auto">
38 <li class="active nav-item"><a class="nav-link" href="../articles/Rnaught.html">Get started</a></li>
39 <li class="nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li>
40 <li class="nav-item dropdown">
41 <button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button>
42 <ul class="dropdown-menu" aria-labelledby="dropdown-articles">
43 <li><a class="dropdown-item" href="../articles/seq_bayes_post.html">Sequential Bayes: Utilizing the Posterior Distribution</a></li>
44 <li><a class="dropdown-item" href="../articles/wp_serial.html">White and Pagano: Utilizing the Serial Distribution</a></li>
45 </ul>
46 </li>
47 </ul>
48 <ul class="navbar-nav">
49 <li class="nav-item"><form class="form-inline" role="search">
50 <input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json">
51 </form></li>
52 <li class="nav-item"><a class="external-link nav-link" href="https://github.com/MI2YorkU/Rnaught/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li>
53 </ul>
54 </div>
55
56
57 </div>
58 </nav><div class="container template-article">
59
60
61
62
63 <div class="row">
64 <main id="main" class="col-md-9"><div class="page-header">
65 <img src="../logo.svg" class="logo" alt=""><h1>Introduction to Rnaught</h1>
66
67
68 <small class="dont-index">Source: <a href="https://github.com/MI2YorkU/Rnaught/blob/master/vignettes/Rnaught.Rmd" class="external-link"><code>vignettes/Rnaught.Rmd</code></a></small>
69 <div class="d-none name"><code>Rnaught.Rmd</code></div>
70 </div>
71
72
73
74 <p>The goal of Rnaught is to provide a a collection of methods for
75 estimating the <a href="https://en.wikipedia.org/wiki/Basic_reproduction_number" class="external-link">basic
76 reproduction number</a>
77 (<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"><semantics><msub><mi>R</mi><mn>0</mn></msub><annotation encoding="application/x-tex">R_0</annotation></semantics></math>)
78 of infectious diseases.</p>
79 <div class="section level2">
80 <h2 id="estimators">Estimators<a class="anchor" aria-label="anchor" href="#estimators"></a>
81 </h2>
82 <p>The following estimators are currently available:</p>
83 <ul>
84 <li>
85 <code><a href="../reference/id.html">id()</a></code>: Incidence Decay (ID)</li>
86 <li>
87 <code><a href="../reference/idea.html">idea()</a></code>: Incidence Decay and Exponential Adjustment
88 (IDEA)</li>
89 <li>
90 <code><a href="../reference/seq_bayes.html">seq_bayes()</a></code>: Sequential Bayes (seqB)</li>
91 <li>
92 <code><a href="../reference/wp.html">wp()</a></code>: White and Pagano (WP)</li>
93 </ul>
94 <p>Every estimator employs its own model, has its own set of parameters,
95 and is better suited to particular scenarios. You should consult each
96 method’s documentation for technical details. Below is a short example
97 computing estimates for a given set of case counts.</p>
98 <div class="sourceCode" id="cb1"><pre class="downlit sourceCode r">
99 <code class="sourceCode R"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://MI2YorkU.github.io/Rnaught">Rnaught</a></span><span class="op">)</span></span>
100 <span></span>
101 <span><span class="co"># Weekly case counts.</span></span>
102 <span><span class="va">cases</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">1</span>, <span class="fl">4</span>, <span class="fl">10</span>, <span class="fl">5</span>, <span class="fl">3</span>, <span class="fl">4</span>, <span class="fl">19</span>, <span class="fl">3</span>, <span class="fl">3</span>, <span class="fl">14</span>, <span class="fl">4</span><span class="op">)</span></span>
103 <span></span>
104 <span><span class="co"># Compute estimates of R0, assuming a serial interval of five days.</span></span>
105 <span><span class="va">mu</span> <span class="op">&lt;-</span> <span class="fl">5</span> <span class="op">/</span> <span class="fl">7</span></span>
106 <span></span>
107 <span><span class="fu"><a href="../reference/id.html">id</a></span><span class="op">(</span><span class="va">cases</span>, <span class="va">mu</span><span class="op">)</span></span>
108 <span><span class="co">#&gt; [1] 1.245734</span></span>
109 <span><span class="fu"><a href="../reference/idea.html">idea</a></span><span class="op">(</span><span class="va">cases</span>, <span class="va">mu</span><span class="op">)</span></span>
110 <span><span class="co">#&gt; [1] 1.419546</span></span>
111 <span><span class="fu"><a href="../reference/seq_bayes.html">seq_bayes</a></span><span class="op">(</span><span class="va">cases</span>, <span class="va">mu</span><span class="op">)</span></span>
112 <span><span class="co">#&gt; [1] 1.026563</span></span>
113 <span><span class="fu"><a href="../reference/wp.html">wp</a></span><span class="op">(</span><span class="va">cases</span>, <span class="va">mu</span><span class="op">)</span></span>
114 <span><span class="co">#&gt; [1] 1.107862</span></span></code></pre></div>
115 </div>
116 <div class="section level2">
117 <h2 id="web-application">Web Application<a class="anchor" aria-label="anchor" href="#web-application"></a>
118 </h2>
119 <p>This serves as a graphical interface for the package. An instance is
120 available at <a href="https://immune.math.yorku.ca/Rnaught" class="external-link uri">https://immune.math.yorku.ca/Rnaught</a>. It can also be run
121 locally by invoking the <code><a href="../reference/web.html">web()</a></code> function.</p>
122 <p>Datasets can be uploaded as a CSV file, or entered manually. The data
123 is visualized in the application through plots that show the case counts
124 (either daily or weekly). If multiple datasets are added, the trends
125 corresponding to these datasets are populated in the same plot. This
126 plot can be exported as a PNG image. Furthermore, the datasets entered
127 can be exported as a CSV.</p>
128 <p>Two sample datasets are included: weekly Canadian COVID-19 case count
129 data from March 3rd, 2020 to March 31st, 2020, and weekly Ontario
130 COVID-19 case count data from March 3rd, 2020 to March 31st, 2020.</p>
131 <p>To estimate the basic reproductive number, the user can choose their
132 preferred estimator, and if applicable, must enter the known <a href="https://en.wikipedia.org/wiki/Serial_interval" class="external-link">serial interval</a>
133 prior to estimation. If multiple estimates of the basic reproductive
134 number are calculated, they are all included in a table where each row
135 represents an estimate. If multiple datasets are being considered, the
136 basic reproduction number is estimated for all datasets and the columns
137 of the table correspond to the different datasets. The table also
138 consists of a column corresponding to the value of the serial interval.
139 This table can also be exported as a CSV.</p>
140 </div>
141 <div class="section level2">
142 <h2 id="datasets">Datasets<a class="anchor" aria-label="anchor" href="#datasets"></a>
143 </h2>
144 <p>The package includes two datasets provided by the <a href="https://github.com/ccodwg/CovidTimelineCanada" class="external-link">COVID-19 Canada
145 Open Data Working Group</a>. These report the national and provincial
146 case counts of COVID-19 in Canada. For details, see
147 <code><a href="../reference/COVIDCanada.html">?COVIDCanada</a></code> and <code><a href="../reference/COVIDCanadaPT.html">?COVIDCanadaPT</a></code>. They are also
148 available as <a href="https://github.com/MI2YorkU/Rnaught/tree/master/inst/extdata" class="external-link">CSV
149 files</a>.</p>
150 </div>
151 </main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2>
152 </nav></aside>
153 </div>
154
155
156
157 <footer><div class="pkgdown-footer-left">
158 <p>Developed by Naeem Model, Sawitree Boonpatcharanon, Jane Heffernan, Hanna Jankowski.</p>
159 </div>
160
161 <div class="pkgdown-footer-right">
162 <p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.1.</p>
163 </div>
164
165 </footer>
166 </div>
167
168
169
170
171
172 </body>
173 </html>