View source: R/02-allocation.R
| print.surv_allocation | R Documentation |
Given fixed total sequencing capacity, finds the optimal allocation across strata that minimizes a specified objective function.
## S3 method for class 'surv_allocation'
print(x, ...)
## S3 method for class 'surv_allocation'
as.data.frame(x, ...)
surv_optimize_allocation(
design,
objective = c("min_mse", "max_detection", "min_imbalance"),
total_capacity,
budget = NULL,
min_per_stratum = 2L,
target_lineage = NULL,
target_prevalence = 0.01,
cost_col = NULL
)
x |
Object to print. |
... |
Additional arguments (unused). |
design |
A |
objective |
Character. One of |
total_capacity |
Integer. Total sequences available. |
budget |
Numeric or |
min_per_stratum |
Integer. Minimum per stratum. Default 2. |
target_lineage |
Character. Required for |
target_prevalence |
Numeric. Assumed prevalence for detection. Default 0.01. |
cost_col |
Character or |
Invisibly returns the input object.
A surv_allocation object.
sim <- surv_simulate(n_regions = 4, n_weeks = 10, seed = 1)
d <- surv_design(sim$sequences, ~ region,
sim$population[c("region", "seq_rate")], sim$population)
a <- surv_optimize_allocation(d, "min_mse", total_capacity = 500)
print(a)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.