Skip to contents

The unit of doubling times is always days.

Usage

doubling_time(x, ...)

Arguments

x

a dataframe calculated from either proportion or incidence growth rate calculations:

e.g. A dataframe containing the following columns:

  • time (as.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 (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 (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

No mandatory groupings.

No default value.

OR

A dataframe containing the following columns:

  • time (as.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 (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 (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

No mandatory groupings.

No default value.

...

not used

Value

the same dataframe with additional columns for doubling time or relative doubling time plus confidence intervals.

Examples

growthrates::england_covid %>%
  growthrates::poisson_locfit_model(window=21) %>%
  growthrates::doubling_time() %>%
  dplyr::glimpse()
#> Rows: 26,790
#> Columns: 15
#> Groups: class [19]
#> $ class               <fct> 00_04, 00_04, 00_04, 00_04, 00_04, 00_04, 00_04, 0…
#> $ time                <time_prd> 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,…
#> $ incidence.fit       <dbl> -17.891227, -17.395804, -16.873590, -16.331042, -1…
#> $ incidence.se.fit    <dbl> 1.9111699, 1.9238465, 1.9194060, 1.9000358, 1.8681…
#> $ incidence.0.025     <dbl> 4.010032e-10, 6.419738e-10, 1.091671e-09, 1.950766…
#> $ incidence.0.5       <dbl> 1.698004e-08, 2.786752e-08, 4.697785e-08, 8.081996…
#> $ incidence.0.975     <dbl> 7.190010e-07, 1.209705e-06, 2.021596e-06, 3.348359…
#> $ growth.fit          <dbl> 0.4798757, 0.4792888, 0.4776793, 0.4752744, 0.4723…
#> $ growth.se.fit       <dbl> 0.05395200, 0.05584978, 0.05729669, 0.05835042, 0.…
#> $ growth.0.025        <dbl> 0.3741317, 0.3698252, 0.3653799, 0.3609097, 0.3565…
#> $ growth.0.5          <dbl> 0.4798757, 0.4792888, 0.4776793, 0.4752744, 0.4723…
#> $ growth.0.975        <dbl> 0.5856197, 0.5887523, 0.5899788, 0.5896391, 0.5880…
#> $ doubling_time.0.5   <dbl> 1.444431, 1.446200, 1.451072, 1.458415, 1.467596, …
#> $ doubling_time.0.025 <dbl> 1.183613, 1.177315, 1.174868, 1.175545, 1.178641, …
#> $ doubling_time.0.975 <dbl> 1.852682, 1.874256, 1.897059, 1.920556, 1.944248, …