View source: R/03-prevalence.R
| print.surv_prevalence | R Documentation |
Estimates the prevalence of a specified pathogen lineage over time, correcting for unequal sequencing rates across strata.
## S3 method for class 'surv_prevalence'
print(x, ...)
## S3 method for class 'surv_prevalence'
as.data.frame(x, ...)
surv_lineage_prevalence(
design,
lineage,
time = "epiweek",
method = c("hajek", "horvitz_thompson", "poststratified"),
conf_level = 0.95,
min_obs = 5L
)
x |
Object to convert. |
... |
Additional arguments (unused). |
design |
A |
lineage |
Character. Target lineage name. |
time |
Character. Time aggregation: |
method |
Character. Estimation method: |
conf_level |
Numeric. Confidence level. Default 0.95. |
min_obs |
Integer. Minimum observations per time period. Default 5. |
Invisibly returns the input object.
A data.frame.
A surv_prevalence object.
sim <- surv_simulate(n_regions = 3, n_weeks = 10, seed = 1)
d <- surv_design(sim$sequences, ~ region,
sim$population[c("region", "seq_rate")], sim$population)
prev <- surv_lineage_prevalence(d, "BA.2.86")
print(prev)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.