format: Format vaccine model output

View source: R/output.R

formatR Documentation

Format vaccine model output

Description

Take raw odin vaccine model output and formats in long format with the option to select variables and summarise over age groups. Output variables are ordered as in argument ordering.

Usage

format(
  x,
  compartments = c("S", "E", "IMild", "ICase", "IICU", "IHospital", "IRec", "R", "D"),
  summaries = c("N", "hospitalisations", "hospital_demand", "hospital_occupancy",
    "ICU_demand", "ICU_occupancy", "vaccines", "unvaccinated", "vaccinated",
    "priorvaccinated", "infections", "deaths"),
  reduce_age = TRUE,
  date_0 = NULL,
  replicate = 1
)

Arguments

x

squire_simulation object

compartments

Vector of compartment names, e.g. c("S", "R"), or sub-compartment names, e.g. c("S", "E1", "E2")

summaries

Vector of summary names, which may be:

  • "deaths" Deaths per day

  • "infections" Infections per day. New infections (note this is currently a slightly different definitionto the main Squire mode)

  • "hospitilisations" Hospitalisations per day (Note this takes into account hospital capacity)

  • "hospital_occupancy" Occupied Hospital Beds

  • "ICU_occupancy" Occupied ICU Beds

  • "hospital_demand Required Hospital Beds

  • "ICU_demand Required ICU Beds

  • "vaccinated" Vaccines administered per day

reduce_age

Collapse age-dimension, calculating the total in the compartment.

date_0

Date of time 0 (e.g. "2020-03-01"), if specified a date column will be added

replicate

Which replicate is being formatted. Default = 1

Value

Formatted long data.frame


mrc-ide/nimue documentation built on March 25, 2022, 4:45 a.m.