Skip to contents

Extract simulated quantities based on the provided configuration.

Usage

extract_simulated_quantity(sim_diags, quantity, deterministic = FALSE)

Arguments

sim_diags

The simulated diagnosis data containing stan_data and sim_data.

quantity

The quantity to extract.

deterministic

Logical indicating whether to re-run the simulation deterministically (dist = FALSE) to obtain the expected values (lambda) rather than the stochastic realisation. Useful for bias/MSE calculations across multiple seeds (default is FALSE).

Value

A list of model estimates including undiagnosed prevalence, incidence, migration, diagnosis probabilities, diagnoses, migration probabilities, proportion of UK-acquired infections that are migrants, transfers of care, and CD4 strata.