
Generate a simple time-series of cases based on a growth rate step function
Source:R/simulation-utils.R
sim_test_data.Rd
This time-series has no statistical noise and is useful for testing things. It has a fixed known value for infections and growth rate (fixed at 0.05 and -0.05 per day), and a instantaneous reproduction number which is based on the provided infectivity profile. A fixed denominator gives a known proportion and a relative growth rate that is the same as the growth rate.
Examples
sim_test_data() %>% dplyr::glimpse()
#> Rows: 501
#> Columns: 8
#> $ time <time_prd> 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,…
#> $ growth <dbl> 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, …
#> $ incidence <dbl> 100.0000, 105.1271, 110.5171, 116.1834, 122.1403, 128.…
#> $ rt <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
#> $ denom <dbl> 12182, 12182, 12182, 12182, 12182, 12182, 12182, 12182…
#> $ proportion <dbl> 0.008208500, 0.008629359, 0.009071795, 0.009536916, 0.…
#> $ relative.growth <dbl> 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, …
#> $ count <dbl> 100, 105, 111, 116, 122, 128, 135, 142, 149, 157, 165,…