The unit of doubling times is always days.
Arguments
- x
proportion or incidence growth rates - EITHER: a dataframe with columns:
time (ggoutbreak::time_period + group_unique) - A (usually complete) set of singular observations per unit time as a `time_period`
incidence.fit (double) - an estimate of the incidence rate on a log scale
incidence.se.fit (positive_double) - the standard error of the incidence rate estimate on a log scale
incidence.0.025 (positive_double) - lower confidence limit of the incidence rate (true scale)
incidence.0.5 (positive_double) - median estimate of the incidence rate (true scale)
incidence.0.975 (positive_double) - upper confidence limit of the incidence rate (true scale)
growth.fit (double) - an estimate of the growth rate
growth.se.fit (positive_double) - the standard error the growth rate
growth.0.025 (double) - lower confidence limit of the growth rate
growth.0.5 (double) - median estimate of the growth rate
growth.0.975 (double) - upper confidence limit of the growth rate
Any grouping allowed.
OR with columns:
time (ggoutbreak::time_period + group_unique) - A (usually complete) set of singular observations per unit time as a `time_period`
proportion.fit (double) - an estimate of the proportion on a logit scale
proportion.se.fit (positive_double) - the standard error of proportion estimate on a logit scale
proportion.0.025 (proportion) - lower confidence limit of proportion (true scale)
proportion.0.5 (proportion) - median estimate of proportion (true scale)
proportion.0.975 (proportion) - upper confidence limit of proportion (true scale)
relative.growth.fit (double) - an estimate of the relative growth rate
relative.growth.se.fit (positive_double) - the standard error the relative growth rate
relative.growth.0.025 (double) - lower confidence limit of the relative growth rate
relative.growth.0.5 (double) - median estimate of the relative growth rate
relative.growth.0.975 (double) - upper confidence limit of the relative growth rate
Any grouping allowed.
- ...
not used
Value
the same dataframe with additional columns for doubling time or relative doubling time plus confidence intervals.
Examples
ggoutbreak::test_poisson_rt_smooth %>%
ggoutbreak::poisson_locfit_model(window=21) %>%
ggoutbreak::doubling_time() %>%
dplyr::glimpse()
#> Rows: 161
#> Columns: 23
#> Groups: statistic [1]
#> $ statistic <chr> "infections", "infections", "infections", "infecti…
#> $ time <time_prd> 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,…
#> $ incidence.fit <dbl> 2.214227, 2.073434, 1.941397, 1.818162, 1.703777, …
#> $ incidence.se.fit <dbl> 0.2927172, 0.2595760, 0.2323369, 0.2105248, 0.1936…
#> $ incidence.0.025 <dbl> 5.157806, 4.781120, 4.419493, 4.077731, 3.759096, …
#> $ incidence.0.05 <dbl> 5.656184, 5.188631, 4.755191, 4.357417, 3.995656, …
#> $ incidence.0.25 <dbl> 7.514179, 6.674893, 5.957722, 5.345019, 4.821785, …
#> $ incidence.0.5 <dbl> 9.154326, 7.952088, 6.968479, 6.160524, 5.494660, …
#> $ incidence.0.75 <dbl> 11.152473, 9.473665, 8.150717, 7.100454, 6.261435,…
#> $ incidence.0.95 <dbl> 14.815938, 12.187355, 10.211936, 8.709762, 7.55602…
#> $ incidence.0.975 <dbl> 16.247544, 13.226125, 10.987618, 9.307150, 8.03153…
#> $ growth.fit <dbl> -0.145153413, -0.136234114, -0.127293224, -0.11833…
#> $ growth.se.fit <dbl> 0.044379771, 0.041741394, 0.039076146, 0.036407742…
#> $ growth.0.025 <dbl> -0.232136166, -0.218045744, -0.203881062, -0.18969…
#> $ growth.0.05 <dbl> -0.218151640, -0.204892598, -0.191567764, -0.17822…
#> $ growth.0.25 <dbl> -0.175087114, -0.164388257, -0.153649683, -0.14289…
#> $ growth.0.5 <dbl> -0.145153413, -0.136234114, -0.127293224, -0.11833…
#> $ growth.0.75 <dbl> -0.115219713, -0.108079972, -0.100936764, -0.09378…
#> $ growth.0.95 <dbl> -0.0721551861, -0.0675756303, -0.0630186841, -0.05…
#> $ growth.0.975 <dbl> -0.058170661, -0.054422485, -0.050705386, -0.04697…
#> $ doubling_time.0.5 <dbl> -4.775273, -5.087912, -5.445279, -5.857417, -6.337…
#> $ doubling_time.0.025 <dbl> -11.915752, -12.736412, -13.670090, -14.754470, -1…
#> $ doubling_time.0.975 <dbl> -2.985951, -3.178907, -3.399762, -3.654018, -3.948…