Skill for retrieving and managing epidemiological parameters (incubation periods, serial intervals) using epiparameter.
[!IMPORTANT] Use the Introspection Protocol: See epiverse-overview skill for the protocol. Before generating code, verify package APIs and functions using R introspection commands.
[!NOTE] Workflow Context: This skill's code should be included in Quarto document code chunks (not separate R scripts). See the reporting skill for the complete workflow structure.
This skill provides access to a library of epidemiological parameters from the literature and tools for parameter manipulation.
epiparameterPurpose: Classes and helper functions for working with epidemiological parameters.
Key Functions:
epiparameter_db(): Load parameters from library (disease, epi_name, author filters)epiparameter(): Create custom parameter objectparameter_tbl(): View parameters as tableplot(): Visualize parameter distributionconvert_params_to_summary_stats(): Convert distribution parameters to mean/SDconvert_summary_stats_to_params(): Convert mean/SD to distribution parametersextract_param(): Extract parameters from summary statisticsSupported Distributions: gamma, lognormal, Weibull, normal, negative binomial, geometric
epiparameterDBPurpose: Database of epidemiological parameters extracted from literature.
Access: Via epiparameter::epiparameter_db() (recommended) or direct JSON access
Coverage: 23 diseases, 125+ parameter sets including incubation periods, serial intervals, generation times, onset-to-hospitalization, onset-to-death
Online Database: View at https://epiverse-trace.github.io/epiparameter/articles/database.html
# Search by disease and parameter type
param <- epiparameter_db(
disease = "Ebola Virus Disease",
epi_name = "incubation period",
single_epiparameter = TRUE
)
# View all available parameters
all_params <- epiparameter_db()
parameter_tbl(all_params)
# Extract distribution function
dist_func <- function(x) dgamma(x, shape = param$shape, scale = param$scale)
# Use in analysis
cfr_static(data, delay_density = dist_func)
# When parameter not in library
custom_param <- epiparameter(
disease = "COVID-19",
epi_name = "onset to hospitalization",
prob_distribution = create_prob_distribution(
prob_distribution = "lnorm",
prob_distribution_params = c(meanlog = 1.5, sdlog = 0.5)
)
)
# Convert summary statistics to distribution parameters
params <- convert_summary_stats_to_params(
mean = 10,
sd = 5,
distribution = "gamma"
)
get_citation())single_epiparameter = TRUE when expecting one resultplot() to verify plausibilityTo add parameters to the library: