condition_and_report_on_cases: Condition on cases and return accepted sample size by...

Description Usage Arguments Value Author(s) Examples

View source: R/condition_and_report_on_cases.R

Description

Condition on cases and return accepted sample size by scenario

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
condition_and_report_on_cases(
  sims,
  condition_date = NULL,
  lower_bound = NULL,
  upper_bound = NULL,
  samples = NULL,
  end_of_seed_date = "2019-12-31",
  scenarios_list = c("scenario", "event_duration", "event_size", "serial_mean",
    "serial_type", "upper_R0", "lower_R0")
)

Arguments

sims

A data.table from scenario_analysis.

condition_date

A character string in the following format "2020-01-01". Sets the date on which to condition the data.

lower_bound

Numeric, the estimated lower bound on cases.

upper_bound

Numeric, the estimated upper bound on cases.

samples

Numeric, the number of samples that were used.

end_of_seed_date

A character string in the following format "2020-01-01". The assumed end date of the seeding event.

scenarios_list

A character vector listing scenarios evaluated.

Value

A list of 3 data.frames as produced by condition_on_known, proportion_allowed_by_condition, and restrict_by_condition.

Author(s)

Sam Abbott

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Example
sims <- data.frame(time = rep(1:10, 10),
                   size = rep(1:10, 10),
                   sample = unlist(lapply(1:10, function(.) {rep(., 10)})),
                   scenario = c(rep(1, 5), rep(1, 5)),
                   tmp = c(rep(1, 5), rep(1, 5)),
                   event_duration = 1
                  )


condition_and_report_on_cases(sims, condition_date = "2020-01-03", lower_bound = 3, upper_bound = 5,
                              scenarios_list = c("scenario", "tmp"), samples = 10)

## Code
condition_and_report_on_cases

epiforecasts/WuhanSeedingVsTransmission documentation built on Feb. 12, 2020, 9:30 p.m.