-
Notifications
You must be signed in to change notification settings - Fork 4
/
README.Rmd
120 lines (80 loc) · 4.9 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
---
output: github_document
editor_options:
markdown:
wrap: 72
bibliography: vignettes/references.bib
link-citations: true
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-"
)
```
## *serofoi*: force-of-infection from population based serosurveys with age-disaggregated data <img src="man/figures/logo.png" align="right" width="130"/>
<!-- badges: start -->
[![License:
MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![R-CMD-check](https://github.com/epiverse-trace/serofoi/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/epiverse-trace/serofoi/actions/workflows/R-CMD-check.yaml)
[![Codecov test
coverage](https://codecov.io/gh/epiverse-trace/serofoi/branch/dev/graph/badge.svg)](https://app.codecov.io/gh/epiverse-trace/serofoi/tree/dev/R?displayType=list)
[![lifecycle-maturing](https://raw.githubusercontent.com/reconverse/reconverse.github.io/master/images/badge-maturing.svg)](https://www.reconverse.org/lifecycle.html#maturing)
<!-- badges: end -->
***serofoi*** is an R package to estimate the *Force-of-Infection (FoI)* of a given pathogen from age-disaggregated population-based cross-sectional serosurveys, using a Bayesian framework. The package provides a set of features for assessing model fitting, convergence and visualisation.
***serofoi*** relies on the [`rstan`](https://mc-stan.org/users/interfaces/rstan) package, which provides an R interface for the Stan programming language for statistical Bayesian modelling. Particularly, ***serofoi*** relies on the use of a *Hamiltonian Monte Carlo (HMC)* algorithm implemented by *Stan for Markov chain Monte Carlo (MCMC)* sampling. The implemented methods are outlined in [@cucunubá2017] and [@carrera2020] (see [FoI Models](https://epiverse-trace.github.io/serofoi/articles/foi_models.html) for further details)
***serofoi*** is part of the [Epiverse Initiative](https://data.org/initiatives/epiverse/).
## Installation
You can install the **development version** of ***serofoi*** from [GitHub](https://github.com/) with:
``` r
if(!require("pak")) install.packages("pak")
pak::pak("epiverse-trace/serofoi")
```
## Quick start
```{r cleaning, include = FALSE, echo = TRUE}
library(serofoi)
```
***serofoi*** provides a minimal serosurvey dataset, `serodata`, that can be used to test out the package.
```{r ex, include = TRUE}
# Load example dataset chagas2012 included with the package
data(chagas2012)
head(chagas2012, 5)
```
The function `prepare_serodata` will prepare the entry data for the use of the modelling module; this function computes the sample size, the years of birth and the binomial confidence interval for each age group in the provided dataset. A visualisation of the prepared seroprevalence data can be obtained using the function plot_seroprev:
```{r data_test, include = TRUE, out.fig.height="30%", out.width="50%", fig.align="center", message=FALSE, warning=FALSE}
serodata_test <- prepare_serodata(chagas2012)
plot_seroprev(serodata_test, size_text = 15)
```
### Contributions
Contributors to the project include:
- [Zulma M. Cucunubá](https://github.com/zmcucunuba) (author,
maintainer)
- [Nicolás Torres](https://github.com/ntorresd) (author)
- [Ben Lambert](https://ben-lambert.com/about/) (author)
- [Pierre Nouvellet](https://github.com/pnouvellet) (author)
- [Geraldine Gómez](https://github.com/megamezl) (contributor)
- [Jaime A. Pavlich-Mariscal](https://github.com/jpavlich) (contributor)
- [Miguel Gamez](https://github.com/megamezl) (contributor)
- [Hugo Gruson](https://github.com/Bisaloo) (contributor)
- [David Santiago Quevedo](https://github.com/davidsantiagoquevedo) (contributor)
- [Everlyn Kamau](https://github.com/ekamau) (contributor)
- [Richard Creswell](https://github.com/rccreswell) (contributor)
- [Sumali Bajaj](https://github.com/sumalibajaj) (contributor)
## Package vignettes
More details on how to use ***serofoi*** can be found in the
[online documentation](https://epiverse-trace.github.io/serofoi/) as package vignettes, under
[**Get Started**](https://epiverse-trace.github.io/serofoi/articles/serofoi.html),
[**An Introduction to FoI Models**](https://epiverse-trace.github.io/serofoi/articles/foi_models.html) and
[**Real-life Use Cases for serofoi**](https://epiverse-trace.github.io/serofoi/articles/use_cases.html)
## Help
To report a bug please open an
[issue](https://github.com/epiverse-trace/serofoi/issues).
## Contribute
Contributions to ***serofoi*** are welcomed. Please follow the
[package contributing guide](https://github.com/epiverse-trace/serofoi/blob/main/.github/CONTRIBUTING.md).
## Code of conduct
Please note that the ***serofoi*** project is released with a
[Contributor Code of Conduct](https://github.com/epiverse-trace/.github/blob/main/CODE_OF_CONDUCT.md).
By contributing to this project, you agree to abide by its terms.
## References