View source: R/13-infrastructure.R
| surv_estimate | R Documentation |
Convenience wrapper that creates a design, estimates prevalence, and optionally applies delay correction in a single pipe-friendly call. Designed for rapid exploratory analysis in interactive sessions.
surv_estimate(
data,
strata,
sequencing_rate,
population,
lineage,
correct_delay = FALSE,
method = "hajek",
...
)
data |
Data frame of sequence records. |
strata |
One-sided formula for stratification. |
sequencing_rate |
Sequencing rate specification (see |
population |
Population data frame. |
lineage |
Character. Target lineage to estimate. |
correct_delay |
Logical. Apply delay correction? Default |
method |
Character. Prevalence method. Default |
... |
Additional arguments passed to |
A surv_prevalence or surv_adjusted object.
surv_design(), surv_lineage_prevalence()
sim <- surv_simulate(n_regions = 3, n_weeks = 10, seed = 1)
# One-liner analysis:
result <- surv_estimate(
data = sim$sequences, strata = ~ region,
sequencing_rate = sim$population[c("region", "seq_rate")],
population = sim$population,
lineage = "BA.2.86"
)
print(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.