Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ license: MIT
title: 'serofoi: Bayesian Estimation of the Force of Infection from Serological Data'
version: 1.0.2
abstract: Estimating the force of infection from time varying, age varying, or constant
serocatalytic models from population based seroprevalence studies using a bayesian
serocatalytic models from population based seroprevalence studies using a Bayesian
framework, including data simulation functions enabling the generation of serological
surveys based on this models. This tool also provides a flexible prior specification
syntax for the force of infection and the seroreversion rate, as well as methods
Expand Down Expand Up @@ -229,7 +229,7 @@ references:
title: Matrix
abstract: 'Matrix: Sparse and Dense Matrix Classes and Methods'
notes: Imports
url: https://Matrix.R-forge.R-project.org
url: https://R-forge.R-project.org/tracker/?atid=294&group_id=61
repository: https://CRAN.R-project.org/package=Matrix
authors:
- family-names: Bates
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Authors@R: c(
person("Pontificia Universidad Javeriana", role = "cph")
)
Description: Estimating the force of infection from time varying, age varying, or constant
serocatalytic models from population based seroprevalence studies using a bayesian framework,
serocatalytic models from population based seroprevalence studies using a Bayesian framework,
including data simulation functions enabling the generation of serological surveys based on this
models. This tool also provides a flexible prior specification syntax for the force of infection
and the seroreversion rate, as well as methods to assess model convergence and comparison
Expand Down
2 changes: 2 additions & 0 deletions R/fit_seromodel.R
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ set_foi_init <- function(
#' @return stan_fit object with Force-of-Infection and seroreversion
#' (when applicable) samples
#' @examples
#' \donttest{
#' data(chagas2012)
#' seromodel <- fit_seromodel(
#' serosurvey = chagas2012,
Expand All @@ -113,6 +114,7 @@ set_foi_init <- function(
#' ),
#' iter = 100
#' )
#' }
#' @export
fit_seromodel <- function(
serosurvey,
Expand Down
8 changes: 8 additions & 0 deletions R/plot_seromodel.R
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ plot_seroprev_estimates <- function(
#' @param foi_max Max FoI value for plotting
#' @return ggplot object with estimated FoI
#' @examples
#' \donttest{
#' data(chagas2012)
#' seromodel <- fit_seromodel(
#' serosurvey = chagas2012,
Expand All @@ -320,6 +321,7 @@ plot_seroprev_estimates <- function(
#' chains = 2
#' )
#' plot_foi_estimates(seromodel, chagas2012)
#' }
#' @export
plot_foi_estimates <- function(
seromodel,
Expand Down Expand Up @@ -443,6 +445,7 @@ plot_foi_estimates <- function(
#' @return ggplot object showing the r-hats of the model to be compared with the
#' convergence criteria (horizontal dashed line)
#' @examples
#' \donttest{
#' data(chagas2012)
#' seromodel <- fit_seromodel(
#' serosurvey = chagas2012,
Expand All @@ -455,6 +458,7 @@ plot_foi_estimates <- function(
#' chains = 2
#' )
#' plot_rhats(seromodel, chagas2012)
#' }
#' @export
plot_rhats <- function(
seromodel,
Expand Down Expand Up @@ -545,9 +549,11 @@ plot_rhats <- function(
#' Only relevant when `seromodel@model_name == "constant"`)
#' @return ggplot object with a summary of the specified model
#' @examples
#' \donttest{
#' data(veev2012)
#' seromodel <- fit_seromodel(veev2012, iter = 100)
#' plot_summary(seromodel, veev2012)
#' }
#' @export
plot_summary <- function(
seromodel,
Expand Down Expand Up @@ -611,9 +617,11 @@ plot_summary <- function(
#' @param seroreversion_digits Number of seroreversion rate digits
#' @return seromodel summary plot
#' @examples
#' \donttest{
#' data(veev2012)
#' seromodel <- fit_seromodel(veev2012, iter = 100)
#' plot_seromodel(seromodel, veev2012)
#' }
#' @export
plot_seromodel <- function(
seromodel,
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ To report a bug please open an [issue](https://github.com/{{ gh_repo }}/issues/n

## Contribute

Contributions to _{{ packagename }}_ are welcomed. Please follow the [package contributing guide](https://github.com/{{ gh_repo }}/blob/main/.github/CONTRIBUTING.md).
Contributions to _{{ packagename }}_ are welcomed. Please follow the [package contributing guide](https://github.com/epiverse-trace/.github/blob/main/CONTRIBUTING.md).

## Code of conduct

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ To report a bug please open an

Contributions to *serofoi* are welcomed. Please follow the [package
contributing
guide](https://github.com/epiverse-trace/serofoi/blob/main/.github/CONTRIBUTING.md).
guide](https://github.com/epiverse-trace/.github/blob/main/CONTRIBUTING.md).

## Code of conduct

Expand Down
4 changes: 4 additions & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ BMJ
Bahia
Bajaj
Basáñez
Bayesian
Binom
CMD
Christl
Expand Down Expand Up @@ -43,6 +44,7 @@ Quevedo
RStan
Refactorization
Serocatalytic
Serological
Seroreversion
Serosurvey
Serosurveys
Expand Down Expand Up @@ -98,9 +100,11 @@ rstan
sd
se
serocatalytic
serological
seromodel
seropositives
seropositivities
seroprevalence
seroreversion
serosurvey
serosurveys
Expand Down
2 changes: 2 additions & 0 deletions man/fit_seromodel.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/plot_foi_estimates.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/plot_rhats.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/plot_seromodel.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/plot_summary.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vignettes/serofoi.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Current version of ***serofoi*** includes the following assumptions on the under
* There is no impact from migration processes in the sampled population, which means the model is not suited for a situation with high levels of migration.
* There are no differences in the mortality rate of infected versus susceptible individuals. This may be a limitation for situations with a high infection fatality rate, such as Ebola.

## The bayesian statistical framework
## The Bayesian statistical framework

To assess how well the mathematical representation of the different FoI models describes the seroprevalence data, we implement a fitting process that relies on a Bayesian framework. The priors and upper priors for each model indicate the assumed trajectory of the FoI (either constant or time-varying). serofoi provides a set of Bayesian comparison methods for the user to choose between various possible FoI models (trajectories) that best fit the seroprevalence data. For details see [An Introduction To Force-of-Infection Models](https://epiverse-trace.github.io/serofoi/articles/foi_models.html).

Expand Down