View source: R/growth-advantage.R
| growth_advantage | R Documentation |
Computes relative fitness of each lineage from a fitted model. Supports four output formats for different use cases.
growth_advantage(
fit,
type = c("growth_rate", "relative_Rt", "selection_coefficient", "doubling_time"),
generation_time = NULL,
ci_level = NULL
)
fit |
An |
type |
Output type:
|
generation_time |
Mean generation time in days. Required for
|
ci_level |
Confidence level for intervals. Default uses the level from the fitted model. |
The "relative_Rt" and "selection_coefficient" types use the
Piantham approximation (Piantham et al. 2022,
\Sexpr[results=rd]{tools:::Rd_expr_doi("10.3390/v14112556")}), which assumes:
Variants are in their exponential growth phase (not saturating due to population-level immunity).
All variants share the same generation time distribution.
Growth advantage reflects transmissibility differences; immune escape is not separately identified.
Confidence intervals for "relative_Rt" are computed in
log-space (Wald intervals on log-Rt), which is more accurate
than the linear delta method for ratios.
A tibble with columns:
Lineage name.
Point estimate.
Lower confidence bound.
Upper confidence bound.
Type of estimate.
Name of pivot (reference) lineage.
Piantham C, Linton NM, Nishiura H (2022). Predicting the trajectory of replacements of SARS-CoV-2 variants using relative reproduction numbers. Viruses, 14(11):2556. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.3390/v14112556")}
Abousamra E, Figgins M, Bedford T (2024). Fitness models provide accurate short-term forecasts of SARS-CoV-2 variant frequency. PLoS Computational Biology, 20(9):e1012443. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1371/journal.pcbi.1012443")}
sim <- simulate_dynamics(
n_lineages = 3,
advantages = c("JN.1" = 1.3, "KP.3" = 0.9),
n_timepoints = 15, seed = 42
)
fit <- fit_model(sim, engine = "mlr")
# Growth rates per week
growth_advantage(fit, type = "growth_rate")
# Relative Rt (needs generation time)
growth_advantage(fit, type = "relative_Rt", generation_time = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.