## All functions

example_ct_data

Example Ct value data

example_gp_partab

Example Gaussian Process prior parameter table

example_seir_incidence

True simulated SEIR incidence

example_seir_partab

Example SEIR model parameter table

likelihood_detectable()

Likelihood for using proportion detectable only

p_a()

Function to give probability of observing x given age a and the viral kinetics curve

plot_distribution_fits()

Plot distribution fits

plot_posterior_density()

Plot posterior density

plot_prob_infection()

Plot probability of infection

predicted_distribution_fits()

Predicted distribution fits

prop_detectable_single()

Probability of having a detectable Ct for a given time since infection

reverse_gp_model()

Given a vector of daily infection probabilities, converts this to the input expected by the Gaussian process model

simulate_observations_wrapper()

Simulate full line list data

simulate_reporting()

Subset line list data by testing strategy. Options:

1. Sample a random fraction of the population if the only argument is frac_report

2. Sample some random fraction of the population at a subset of time points, specified by timevarying_prob

3. Observe symptomatic individuals with some fixed probability, frac_report if symptomatic is TRUE

4. Observe symptomatic individuals with some time-varying probability, timevarying_prob, if symptomatic is TRUE INPUTS:

1. individuals: the full line list from the simulation, returned by virosolver::simulate_observations_wrapper

2. solve_times: vector of times at which individuals can be reported

3. frac_report: the overall fraction/probability of individuals who are reported

4. timevarying_prob: a tibble with variables t and prob. This gives the probability of being reported on day t

5. symptomatic: if TRUE, then individuals are reported after developing symptoms. If FALSE, then we take a random cross-section OUTPUTS:

6. A tibble with line list data for individuals who were observed

7. A plot of incidence for both observed individuals and the entire simulated population

8. Plot growth rate of cases/infections in the entire population and observed population

simulate_viral_loads_wrapper()

Simulate observed Ct values for the line list dataset. NOTE this differs to virosolver::simulate_viral_loads, as this function only solves the viral kinetics model for the observation time INPUTS: 1. linelist: the line list for observed individuals 2. kinetics_pars: vector of named parameters for the viral kinetics model OUTPUTS: 1. A tibble with the line list data and the viral load/ct/observed ct at the time of sampled