Description Usage Arguments Value
View source: R/multi_trajectories_to_binned_distributions.R
Convert a collection of matrices of sampled trajectories for different units (e.g., different locations or age groups) to binned distributions for short-term and/or seasonal targets.
1 2 3 4 5 6 7 8 9 | multi_trajectories_to_binned_distributions(
multi_trajectories,
targets,
h_max,
bins,
season_start_ew,
season_end_ew,
cdc_report_ew
)
|
multi_trajectories |
tibble with at minimum a column called 'trajectories' containing simulated trajectories. Other columns may also be provided which are treated as uniquely identifying units such as locations or age groups. |
h_max |
largest horizon for short-term targets |
targets: |
character vector specifying targets to compute. May include: "wk ahead", "Below baseline for 3 weeks", "First week below baseline", "Peak height", "Peak week" |
bins: |
vector of start and end points for incidence targets. For example: c(seq(from = 0.0, to = 25.0, by = 0.1), 100.0) |
season_start_ew: |
character specification of season start epidemic week, formatted as "2019-EW40" |
season_end_ew: |
character specification of season end epidemic week, formatted as "2020-EW20" |
cdc_report_ew: |
character specification of epidemic week corresponding to most recent cdc report, formatted as "2019-EW40" |
data frame with columns: ...: columns in multi_trajectories other than 'trajectories' target: with values coming from names(bins) type: populated with "Bin" bin: name of bin for categorical targets, lower endpoint of bin for numeric targets value: proportion of trajectories falling in bin
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.