noroBE: Create '"sts"' Objects from the Berlin Norovirus Data

noroBER Documentation

Create "sts" Objects from the Berlin Norovirus Data

Description

The function noroBE() creates an "sts" object based on the array of norovirus surveillance counts, the map of Berlin's city district, and the pop2011 data stored in the package. This is the data analysed by Meyer and Held (2017).

Usage

noroBE(
  by = c("districts", "agegroups", "all", "none"),
  agegroups = c(1, 2, 2, 4, 4, 2),
  timeRange = c("2011-w27", "2015-w26"),
  flatten = FALSE
)

counts

map

Arguments

by

character string determining the stratification, i.e., which units the resulting "sts" object should represent:

"districts":

aggregates counts and pop2011 over the age groups and stores the matrix of adjacency orders from the map in the neighbourhood slot. The latter is obtained via nbOrder(poly2adjmat(map), maxlag = 5).

"agegroups":

aggregates counts and pop2011 over the districts and stores the contactmatrix() in the neighbourhood slot, potentially also combining some age groups via the agegroups argument.

"all":

retains both dimensions, either as a list of spatial "sts" objects per age group, or in a single "sts" object (see flatten below).

"none":

creates the overall (univariate) time series of rowSums(counts).

agegroups

how the age groups in counts (and pop2011) should be aggregated. Will be used as the grouping argument in aggregateCountsArray and contactmatrix. The default setting uses the six age groups of Meyer and Held (2017).

timeRange

character vector of length two determining the time range of the "sts" object to generate. The two strings are matched against dimnames(counts)[[1]], which ranges from "2011-w01" until "2016-w30". The default value extracts four seasons (years) starting at "2011-w27".

flatten

logical indicating whether for by = "all" a single "sts" object should be returned where the observation unit is the interaction of district and age group (“flattened” counts array, see as.data.frame.array). By default (flatten = FALSE), a list of district-based "sts" objects is returned, one for each age group.

Format

counts:

an integer-valued array of norovirus surveillance counts with labelled dimensions of size 290 ("week") x 12 ("district") x 15 ("agegroup").

map:

a "SpatialPolygonsDataFrame" of length 12 with row.names(map) matching colnames(counts), representing Berlin's city districts in longlat coordinates (WGS84). The data slot contains the full "NAME"s of the city districts as well as their "POPULATION", i.e., rowSums(pop2011).

The function noroBE() returns an "sts" object generated from these data (and pop2011).

Author(s)

Sebastian Meyer

Source

counts:

based on norovirus surveillance counts retrieved from the SurvStat@RKI 2.0 online service (https://survstat.rki.de) of Germany's public health institute, the Robert Koch Institute, as of 2016-09-08.

map:

based on a KML file of Berlin's 97 local centres (“Ortsteile”) downloaded from the Berlin Open Data repository at https://daten.berlin.de/datensaetze/geometrien-der-ortsteile-von-berlin-juli-2012 as of 2014-11-12, published by Amt fuer Statistik Berlin-Brandenburg (Statistical Office of Berlin-Brandenburg) under the ‘CC BY 3.0 DE’ license (https://creativecommons.org/licenses/by/3.0/de/). The map included here aggregates these local centres by city district.

References

Meyer S and Held L (2017): Incorporating social contact data in spatio-temporal models for infectious disease spread. Biostatistics, 18 (2), 338-351. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1093/biostatistics/kxw051")}

Examples

## the raw data
str(counts)
summary(map)

## district-specific time series
noroBEr <- noroBE(by = "districts")
plot(noroBEr)

## age group-specific time series
noroBEg <- noroBE(by = "agegroups")
plot(noroBEg)

## list of spatio-temporal surveillance counts, one for each age group
noroBErbyg <- noroBE(by = "all", flatten = FALSE)
plot(noroBErbyg[[1L]], par.list = list(oma=c(0,0,2,0)))
title(main = names(noroBErbyg)[1], outer = TRUE, line = -1)

## flattened "sts" object (the 'neighbourhood' only reflects spatial info)
noroBEall <- noroBE(by = "all", flatten = TRUE)
dev.new(width = 16, height = 7)
plot(noroBEall, par.list = list(
    xaxt = "n", mar = c(1,4,1,1), mfrow = c(ncol(noroBEg), ncol(noroBEr))
))

hhh4contacts documentation built on Nov. 6, 2023, 5:09 p.m.