knitr::opts_chunk$set(collapse = T, comment = "#>")
options(tibble.print_min = 4L, tibble.print_max = 4L)
library(dplyr)
library(ggplot2)
library(flumodelr)

The following brief descriptions of test data used in this package.

Centers for Diseases Control and Prevention 122-cities

Description from CDC website

This file contains the complete set of data reported to 122 Cities Mortality Reposting System. The system was retired on 10/6/2016. 122 cities across the United States reported the total number of death certificates processed and the number of those for which pneumonia or influenza was listed as the underlying or contributing cause of death by age group. A death is reported by the place of its occurrence and by the week that the death certificate was filed. Fetal deaths are not included. After the system was retired, mortality has been monitored via a more general mechanism described here:

National Center for Health Statistics (NCHS) mortality surveillance data – > NCHS collects death certificate data from state vital statistics offices for > all deaths occurring in the United States. Pneumonia and influenza (P&I) deaths are identified based on ICD-10 multiple cause of death codes. NCHS surveillance data are aggregated by the week of death occurrence and as a result, P&I percentages based on the NCHS surveillance data are released two > weeks after the week of death to allow for collection of enough data to produce a stable P&I percentage. The NCHS surveillance data based on P&I percentage for earlier weeks are continually revised and may increase or decrease as new and updated death certificate data are received from the states by NCHS. The seasonal baseline of P&I deaths is calculated using a periodic regression model that incorporates a robust regression procedure applied to data from the previous five years. An increase of 1.645 standard > deviations above the seasonal baseline of P&I deaths is considered the “epidemic threshold,” i.e., the point at which the observed proportion of deaths attributed to pneumonia or influenza was significantly higher than would be expected at that time of the year in the absence of substantial influenza-related mortality.

https://www.cdc.gov/flu/weekly/overview.htm

cdc122 <- (flumodelr::cdc122city)  
dim(cdc122)
head(cdc122)

NREVSS

CDC Website Description

Viral Surveillance — Data collection from both the U.S. World Health Organization (WHO) Collaborating Laboratories and National Respiratory and Enteric Virus Surveillance System (NREVSS) laboratories began during the 1997-98 season. During the 1997-98 season 43 state public health laboratories participated in surveillance, and by the 2004-05 season all state public health laboratories were participating in surveillance.

The CDC cautions against cross-sectional evaluations:

The number of specimens tested and % positive rate vary by region and season based on different testing practices including triaging of specimens > by the reporting labs, therefore it is not appropriate to compare the magnitude of positivity rates or the number of positive specimens between regions or seasons.

Regarding subtype:

The U.S. WHO and NREVSS collaborating laboratories report the total number > of respiratory specimens tested and the number positive for influenza types > A and B each week to CDC. Most of the U.S. WHO collaborating laboratories also report the influenza A subtype (H1 or H3) of the viruses they have isolated, but the majority of NREVSS laboratories do not report the influenza A subtype.

For more information: http://www.cdc.gov/flu/weekly/overview.htm#Viral

nrevss <- (flumodelr::nrevss)  
dim(nrevss)
head(nrevss)

ILINet

CDC Website Description

Outpatient Illness Surveillance — Information on patient visits to health care providers for influenza-like illness is collected through the U.S. Outpatient Influenza-like Illness Surveillance Network (ILINet).

CDC cautions regarding cross-sectional comparisons:

The number and percent of patients presenting with ILI each week will vary > by region and season due to many factors, including having different provider type mixes (children present with higher rates of ILI than adults, > and therefore regions with a higher percentage of pediatric practices will have higher numbers of cases). Therefore it is not appropriate to compare the magnitude of the percent of visits due to ILI between regions and seasons.

For more information, see: http://www.cdc.gov/flu/weekly/overview.htm#Outpatient

ilinet <- (flumodelr::ilinet)  
dim(ilinet)
head(ilinet)

MMWR Weeks

The MMWR Week is a unique definition used by the CDC. This definition is born out in the ?cdc122city dataset.

The following explanation of the definition was obtained from: https://wwwn.cdc.gov/nndss/document/MMWR_Week_overview.pdf

"The MMWR week is the week of the epidemiologic year for which the National Notifiable Diseases Surveillance System (NNDSS) disease report is assigned by the reporting local or state health department for the purposes of MMWR disease incidence reporting and publishing. Values for MMWR week range from 1 to 53, although most years consist of 52 weeks."

CDC business rules for assigning MMWR week:

"The first day of any MMWR week is Sunday. MMWR week numbering is sequential beginning with 1 and incrementing with each week to a maximum of 52 or 53. MMWR week #1 of an MMWR year is the first week of the year that has at least four days in the calendar year."

This means if Jan. 1 occurs on a Sunday, Monday, Tuesday or Wednesday, the calendar week that includes Jan. 1 would be MMWR week #1. If Jan 1 occurs on a Thursday, Friday, or Saturday, the calendar week that includes Jan 1 would be the last MMWR week of the previous year (#52 or #53). Because of this rule, December 29, 30, and 31 could potentially fall into MMWR week #1 of the following MMWR year.

All ?ilinet , ?cdc122city and ?nrevss datasets are imported in their raw CDC format. It is the perogative of the user to determine how best to treat the CDC MMWR week definition. However, we illustrate below how the above description was used to compute a first day of week, date variable for the example dataset ?fludta.

flumodelr::epiweek_dt

Alternative package which addresses this:

Xiahong Zhao (2016). EpiWeek: Conversion Between Epidemiological Weeks and Calendar Dates. R package version 1.1. https://CRAN.R-project.org/package=EpiWeek

install.packages("EpiWeek")

Also see ?epiweek_dt()

Using the CDC122 Cities as Example

Code adapted from EpiWeek package.

Conversion function

library(lubridate) #For working with dates  
example <- cdc122 %>%
  mutate(FirstDateOfWeek = epiweek_dt(year, week)[[1]])

example %>% select(year, week, FirstDateOfWeek) %>% 
  distinct() %>% 
  dplyr::filter(year>2010) %>%
  head(.)


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