| surv_simulate | R Documentation |
Generates synthetic surveillance datasets with realistic features: multiple regions with unequal sequencing rates, multiple lineages with time-varying prevalence, configurable reporting delays, and multiple sample sources.
surv_simulate(
n_regions = 5L,
n_weeks = 26L,
total_positive_per_week = 1000L,
sequencing_rates = NULL,
lineage_dynamics = NULL,
delay_params = list(mu = 10, size = 3),
sources = c("clinical", "wastewater", "sentinel"),
source_weights = c(0.7, 0.2, 0.1),
seed = NULL
)
n_regions |
Integer. Number of geographic regions. Default 5. |
n_weeks |
Integer. Number of epiweeks. Default 26. |
total_positive_per_week |
Integer. Mean total positive cases per week across all regions. Default 1000. |
sequencing_rates |
Numeric vector of length |
lineage_dynamics |
Named list of functions, each taking a
week number and returning a positive weight. If |
delay_params |
List with |
sources |
Character vector of sample source types.
Default |
source_weights |
Numeric vector (same length as |
seed |
Integer or |
A named list with elements:
Tibble of individual sequence records.
Tibble with one row per region.
Tibble of true lineage prevalence by region and week.
List of all input parameters.
sim <- surv_simulate(n_regions = 3, n_weeks = 8, seed = 42)
head(sim$sequences)
sim$population
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.