condition_on_known: Condition on known cases

Description Usage Arguments Value Author(s) Examples

View source: R/condition_on_known.R

Description

Condition on known cases

Usage

1
2
3
4
5
6
condition_on_known(
  sims,
  days_since_end_seed = NULL,
  lower_bound = NULL,
  upper_bound = NULL
)

Arguments

sims

A data.table from scenario_analysis.

days_since_end_seed

Numeric, the number of days since the end of the seeding event.

lower_bound

Numeric, the estimated lower bound on cases.

upper_bound

Numeric, the estimated upper bound on cases.

Value

A data.table of conditioned scenarios

Author(s)

Sam Abbott

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Example
sims <- data.table::data.table(
                   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
                  )

 sims <- data.table::data.table(scenario = 1:10, sample = 1:10, size = 1:10,
                                event_duration = rep(c(1, 2), 5), time = 1:10)
                                
condition_on_known(sims, upper_bound = 5, lower_bound = 3, days_since_end_seed = 0)


## Code 
condition_on_known

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