knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
options(tibble.print_min = 4L, tibble.print_max = 4L)
library(tidyverse)
library(lubridate)
library(scales)
library(flumodelr)
fludta <- flumodelr::fludta

Introduction to incidence rate-difference models

Incidence rate-difference models are among the first to estimate influenza-associated hospitalizations and deaths [@Izurieta2000]. In these models incidence rates in periods with low viral activity are substracted from incidence rates in periods with high viral activity. This difference in incidence rate is assumed to be influenza attributable.

Virology data

To determine periods with high and low viral activity, researchers often use laboratory confirmed influenza data or the percent of isolates positive with influenza viral types. This is publically available in many cases, see ?nrevss for US surveillance data. The data describes the proportion of isolates tested positive for a certain viral type, which may be obtained from participating hospital and outpatient settings.

Definition of periods: default values

We followed Thompson [@Thompson2009] and defined the respiratory season to start at the beginning of July (week 27) of each calendar year. Within a respiratory season we defined four periods:

(a) a high viral activity period consisting of weeks when at least 10% of specimens are positive, (b) a peri-season baseline period consisting of weeks when less than 10% of specimens were positive, and; (c) an influenza season defined as the weeks from October (week 40) through April (week 18), (d) a summer-season baseline period defined as the weeks from July (week 27) through September (week 39) at the beginning of each respiratory season and May (week 19) and June (week 26) at the end of each respiratory season when there is little viral activity.

Options c and d can be used in the absense of laboratory confirmed influenza surveillance data to define high and low viral activity periods.

Annual excess numbers

Weekly excess outcome rates will be converted to annual excess numbers of outcomes by using the number of weeks that were above an epidemic threshold, and available US census data:

annual excess [outcomes] = (excess weekly rate) x (number of epidemic weeks) x (population).

Example: peri-season adjusted influenza attributable mortality

In this example we will estimate influenza attributable mortality using a peri-season adjustment. We will adjust mortality in weeks with high viral activity (a) with weeks when viral activity was low (b). All we have is a dataset with surveillance data ('prop_flupos') in a certain calendar 'year' and 'week', plus the observed number of all cause hospitalizations in that week ('alldeaths').

We remove years without viral activity

df <- fludta %>% 
  dplyr::filter(year>2010 & year <2016) %>%
  select(year, week, alldeaths, prop_flupos, week)

Step 2. ird() function

fludta_mod <- ird(data =df, 
                  outc =alldeaths, 
                  viral=prop_flupos, 
                  time =week,
                  echo =T)

The initial function prepares the dataset by identifying periods of high and low viral activity in the respiratory season. It creates the table fludta_mod, adding 3 varables (columns): respiratory 'season', 'high[,"prop_flupos"]' (TRUE = high viral activity, FALSE = low viral activity), and 'fluseason' (TRUE = flu season, FALSE = summer-season baseline)

fludta_mod %>% select(year, week, alldeaths, 
                      prop_flupos, week, season, high, fluseason)

Note that 'high[,"prop_flupos"]' will not be created if ird(viral= missing).

Step 2. rb() function

fludta_rates <- rb(data =fludta_mod, outc =alldeaths, echo = T)

The rb() function aggregates the outcomes per time period (weeks in our example) to outcomes per respiratory season, stratified by period of high and low viral activity, and excess rates (period = "High" - period = "Low").

fludta_rates

For 'alldeaths_fluseason', 'period' is defined by flu season (High = flu season, Low = summer-season baseline) For 'alldeaths_viral_act', 'period' is defined by viral activity (High = high viral activity, Low = low viral activity)

Note that 'alldeaths_viral_act' will not be created if ird(viral= missing).

Generate figure

gr(data =fludta_rates, outc =alldeaths_fluseason, echo = FALSE )

References



kmcconeghy/flumodelr documentation built on June 7, 2019, 8:47 p.m.