serofoi1.0.3 package

Bayesian Estimation of the Force of Infection from Serological Data

simulate_serosurvey_time

Simulate serosurvey data based on a time-varying Force-of-Infection (F...

add_age_group_to_serosurvey

Adds age group marker to serosurvey

build_stan_data

Builds stan data for sampling depending on the selected model

check_age_constraints

Check min and max age consistency for validation purposes

extract_central_estimates

Extracts central estimates from stan_fit object for specified paramete...

fit_seromodel

Runs specified stan model for the Force-of-Infection (FoI)

get_foi_index

Generates Force-of-Infection indexes for heterogeneous age groups

get_seroprev_counts_by_bin

Generate seropositivity counts by bin given the probability and sample...

prob_seroprev_age_by_age

Generate probabilities of seropositivity by age based on an age-varyin...

prob_seroprev_age_time_by_age

Generate probabilities of seropositivity by age based on an age-and-ti...

prob_seroprev_by_age

Generate probabilities of seropositivity by age based on model choice.

prob_seroprev_gen_by_age

Generate probabilities of seropositivity by age based on a general For...

prob_seroprev_time_by_age

Generate probabilities of seropositivity by age based on a time-varyin...

probability_exact_age_varying

Computes the probability of being seropositive when Forces-of-Infectio...

probability_exact_time_varying

Computes the probability of being seropositive when Forces-of-Infectio...

serofoi-package

The 'serofoi' package.

set_foi_init

Sets initialization function for sampling

set_stan_data_defaults

Set stan data defaults for sampling

sf_cauchy

Sets Cauchy distribution parameters for sampling

sf_none

Sets empty prior distribution

sf_normal

Sets normal distribution parameters for sampling

sf_uniform

Sets uniform distribution parameters for sampling

simulate_serosurvey_age_time

Simulate serosurvey data based on an age-and-time-varying Force-of-Inf...

simulate_serosurvey_age

Simulate serosurvey data based on an age-varying Force-of-Infection (F...

simulate_serosurvey_general

Simulate serosurvey data based on general serocatalytic model.

prepare_serosurvey_for_plot

Prepares serosurvey for plotting

validate_simulation_age_time

Helper function to validate consistency between the FoI and the survey...

validate_simulation_age

Helper function to validate consistency between the FoI and the survey...

plot_summary

Plots model summary

plot_foi_estimates

Plots Force-of-Infection central estimates

plot_rhats

Plot r-hats convergence criteria for the specified model

plot_seromodel

Visualise results of the provided model

plot_seroprev_estimates

Plot seroprevalence estimates on top of the serosurvey

plot_serosurvey

Plots seroprevalence from the given serosurvey

validate_survey_features

Helper function to validate serosurvey features for simulation

simulate_serosurvey

Simulate serosurvey data based on various Force-of-Infection (FoI) mod...

summarise_central_estimate

Summarise central estimate

summarise_loo_estimate

Extract specified loo estimate

summarise_seromodel

Summarise specified model

validate_foi_df

Helper function to validate FoI structure for simulation

validate_foi_index

Helper function to validate FoI index consistency

validate_plot_constant

Helper function to validate whether the current plot corresponds to a ...

validate_seroreversion_rate

Helper function to validate seroreversion rate properties for simulati...

validate_serosurvey

Helper function to validate serosurvey structure

Estimating the force of infection from time varying, age varying, or constant 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 criteria along with useful visualisation functions.

  • Maintainer: Zulma M. Cucunubá
  • License: MIT + file LICENSE
  • Last published: 2025-03-31