Skip to contents

This function calculates the probabilities of seropositivity by age based on an abstract model of the serocatalytic system.

Usage

probability_seropositive_general_model_by_age(
  construct_A_fn,
  calculate_seropositivity_function,
  initial_conditions,
  max_age,
  ...
)

Arguments

construct_A_fn

A function that constructs a matrix that defines the multiplier term in the linear ODE system.

calculate_seropositivity_function

A function which takes the state vector and returns the seropositive fraction.

initial_conditions

The initial state vector proportions for each birth cohort.

max_age

The maximum age to simulate seropositivity for.

Value

A dataframe with columns 'age' and 'seropositivity'.