| print.surv_design | R Documentation |
Constructs a survey design object tailored for pathogen genomic surveillance, encoding stratification structure, sequencing rates, and population information needed for design-weighted inference.
## S3 method for class 'surv_design'
print(x, ...)
## S3 method for class 'surv_design'
summary(object, ...)
## S3 method for class 'summary.surv_design'
print(x, ...)
surv_design(
data,
strata,
sequencing_rate,
population,
date_collected = "collection_date",
date_reported = "report_date",
lineage = "lineage",
source_type = NULL,
source_config = NULL
)
x |
Object to print or summarize. |
... |
Additional arguments (unused). |
object |
A |
data |
Data frame of individual sequence records. |
strata |
One-sided formula specifying stratification variables
(e.g., |
sequencing_rate |
Either a one-sided formula
( |
population |
Data frame with one row per stratum, containing stratification variables and population-level denominators. |
date_collected |
Column name for collection date.
Default |
date_reported |
Column name for report date.
Default |
lineage |
Column name for lineage. Default |
source_type |
Column name for sample source. Default |
source_config |
Optional tibble of per-source characteristics. |
Invisibly returns the input object.
A summary list of class summary.surv_design.
Invisibly returns the input object.
An object of class surv_design.
surv_simulate(), surv_lineage_prevalence(),
surv_optimize_allocation()
sim <- surv_simulate(n_regions = 3, n_weeks = 8, seed = 42)
design <- surv_design(
data = sim$sequences,
strata = ~ region,
sequencing_rate = sim$population[c("region", "seq_rate")],
population = sim$population
)
print(design)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.