-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathREADME.Rmd
131 lines (86 loc) · 5.67 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
121
122
123
124
125
126
127
128
129
130
131
---
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 -->
[](https://opensource.org/licenses/MIT)
[](https://github.com/epiverse-trace/serofoi/actions/workflows/R-CMD-check.yaml)
[](https://app.codecov.io/gh/epiverse-trace/serofoi/tree/dev/R?displayType=list)
[](https://www.reconverse.org/lifecycle.html#maturing)
<!-- badges: end -->
_{{ packagename }}_ 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.
_{{ packagename }}_ 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, _{{ packagename }}_ 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). A compelling mathematical treatment of the implemented serocatalytic models can be found in [@kamau2025].
_{{ packagename }}_ is part of the [Epiverse Initiative](https://data.org/initiatives/epiverse/).
## Installation
You can install _{{ packagename }}_ from CRAN using:
```{r install_from_cran, eval = FALSE}
install.packages("serofoi")
```
You can install the **development version** of _{{ packagename }}_ from [GitHub](https://github.com/epiverse-trace/serofoi) running:
```{r install_with_pak, eval = FALSE}
if(!require("pak")) install.packages("pak")
pak::pak("epiverse-trace/serofoi")
```
or:
```{r install_with_remotes, eval = FALSE}
if(!require("remotes")) install.packages("remotes")
remotes::install_github("epiverse-trace/serofoi")
```
## Quick start
```{r load_package, include = FALSE, echo = TRUE}
library(serofoi)
```
_{{ packagename }}_ provides some minimal serosurvey datasets that can be used to test out the package. For instance, the dataset `chagas2012` contains seroprevalence measures of IgG antibodies against Trypanosoma cruzi infection corresponding to a serological survey conducted in Colombia during 2012 on a rural indigenous community that is known to present long-term endemic transmission
```{r load_data, include = TRUE}
# Load example dataset chagas2012 included with the package
data(chagas2012)
head(chagas2012, 5)
```
A visualisation of the serological data can be obtained using the function `plot_serosurvey`:
```{r data_test, fig.cap = "Seroprevalence plot for the chagas2012 dataset.", include = TRUE, out.fig.height="30%", out.width="50%", fig.align="center", message=FALSE, warning=FALSE}
plot_serosurvey(chagas2012, bin_serosurvey = TRUE, size_text = 15)
```
Here, the error bars correspond to the binomial confidence interval and the point size represents the sample size for each age group.
A constant FoI model can easily be implemented by means of `fit_seromodel`:
```{r constant_model, include = TRUE, eval = FALSE}
seromodel <- fit_seromodel(serosurvey = chagas2012)
```
For further details on how to visualise the results and other available models, please refer to the [online documentation](https://epiverse-trace.github.io/serofoi/).
### 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 _{{ packagename }}_ can be found in the [online documentation as package vignettes](https://epiverse-trace.github.io/{{ packagename }}/), under "Articles".
## Help
To report a bug please open an [issue](https://github.com/{{ gh_repo }}/issues/new/choose).
## Contribute
Contributions to _{{ packagename }}_ are welcomed. Please follow the [package contributing guide](https://github.com/epiverse-trace/.github/blob/main/CONTRIBUTING.md).
## Code of conduct
Please note that the _{{ packagename }}_ 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