An open API service indexing awesome lists of open source software.

https://github.com/epiverse-trace/serofoi

Estimates the Force-of-Infection of a given pathogen from population based sero-prevalence studies
https://github.com/epiverse-trace/serofoi

antibodies bayesian-methods epidemiology epiverse r r-package serological-surveys stan-language

Last synced: 3 months ago
JSON representation

Estimates the Force-of-Infection of a given pathogen from population based sero-prevalence studies

Awesome Lists containing this project

README

          

---
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

[![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)

_{{ 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