Extract simulated quantities based on the provided configuration.
Source:R/extract_estimates.R
extract_simulated_quantity.RdExtract simulated quantities based on the provided configuration.
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, the born-abroad:UK-born ratio of UK-acquired incidence, transfers of care, CD4 strata, and the HIV-positive share of the external migration index (migrant_hiv_prevalence).
Examples
# See ?run_backcalc for a full end-to-end workflow.
invisible(NULL)