Learn R Programming

surveillance (version 1.5-4)

imdepi: Occurrence of Invasive Meningococcal Disease in Germany

Description

imdepi contains data on the spatio-temporal location of 636 cases of invasive meningococcal disease caused by two specific meningococcal finetypes in Germany. imdepifit contains a model fit to the imdepi data.

Usage

data(imdepi)
data(imdepifit)

Arguments

encoding

latin1

format

imdepi is an object of class "epidataCS" (a list with components events, stgrid, W and qmatrix). imdepifit is an object of class "twinstim".

source

National Reference Centre for Meningococci (NRZM) -- hosted by the Department of Hygiene and Microbiology, Julius-Maximilians-Universit{ae}t W{ue}rzburg, Germany. Thanks to Dr. Johannes Elias and Prof. Dr. Ulrich Vogel from the NRZM for providing the IMD event data. See http://www.meningococcus.de/ and http://episcangis.hygiene.uni-wuerzburg.de/ for further details about the IMD event data.

Details

The dataset contains a slightly modified version of the data analyzed in Meyer et al. (2012) represented as an "epidataCS" object, which is a list with components events, stgrid, W, and qmatrix.

The events entry is a "SpatialPointsDataFrame" object (ETSR89 projection, i.e. EPSG code 3035, with unit km) containing 636 events, each with the following entries: [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object] There are further auxiliary columns attached to the events' data the names of which begin with a . (dot): These are created during conversion to the "epidataCS" class and are necessary for fitting the data with twinstim, see the description of the "epidataCS"-class. With coordinates(imdepi$events) one obtains the (x,y) locations of the events.

The identifier in tile is indexed according to the German official municipality key ( Amtlicher Gemeindeschl{ue}ssel). See http://de.wikipedia.org/wiki/Amtlicher_Gemeindeschl%C3%BCssel for details. The data component stgrid contains the spatio-temporal grid of endemic covariate information. In addition to the usual bookkeeping variables this includes: [object Object],[object Object] We have actually not included any time-dependent covariates here, we just established this grid with a (reduced -> fast) temporal resolution of monthly intervals so that we can model endemic time trends and seasonality (in this discretized time). The entry W contains the observation window as a SpatialPolygons object. In this case the boundaries of Germany (simplified polygon to enhance speed). The entry qmatrix is a $2\times 2$ identity matrix indicating that no transmission between the two finetypes can occur.

The code used to produce the imdepifit can be found at the end of the examples section below.

References

Meyer, S., Elias, J. and H{oe}hle, M. (2012): A space-time conditional intensity model for invasive meningococcal disease occurrence. Biometrics, 68, 607-616. DOI-Link: http://dx.doi.org/10.1111/j.1541-0420.2011.01684.x

Meyer, S. (2010): Spatio-Temporal Infectious Disease Epidemiology based on Point Processes. Master's Thesis, Ludwig-Maximilians-Universit{ae}t M{ue}nchen. Available as http://epub.ub.uni-muenchen.de/11703/

See Also

the data class "epidataCS", and function twinstim for model fitting.

Examples

Run this code
data("imdepi")

# Basic information
print(imdepi, n=5, digits=2)

# What is an epidataCS-object?
str(imdepi, max.level=4)
names(imdepi$events@data)
# => events data.frame has hidden columns
sapply(imdepi$events@data, class)
# marks and print methods ignore these auxiliary columns

# look at the B type only
imdepiB <- subset(imdepi, type == "B")
#<- subsetting applies to the 'events' component
imdepiB

# select only the last 10 events
tail(imdepi, n=10)   # there is also a corresponding 'head' method

# Access event marks
str(marks(imdepi))

# there is an update-method which assures that the object remains valid
# when changing parameters like eps.s, eps.t or qmatrix
update(imdepi, eps.t = 20)

# Summary
s <- summary(imdepi)
s
str(s)

# Step function of number of infectives
plot(s$counter, xlab = "Time [days]",
     ylab = "Number of infectious individuals",
     main = "Time series of IMD assuming 30 days infectious period")

# distribution of number of potential sources of infection
opar <- par(mfrow=c(1,2), las=1)
for (type in c("B","C")) {
  plot(100*prop.table(table(s$nSources[s$eventTypes==type])),
  xlim=range(s$nSources), xlab = "Number of potential epidemic sources",
  ylab = "Proportion of events [%]")
}
par(opar)

# a histogram of the number of events along time (using the
# plot-method for the epidataCS-class, see ?plot.epidataCS)
opar <- par(mfrow = c(2,1))
plot(imdepi, aggregate = "time", subset = type == "B", main = "Finetype B")
plot(imdepi, aggregate = "time", subset = type == "C", main = "Finetype C")
par(opar)

# Plot the spatial distribution of the events in W
plot(imdepi$W)
colTypes <- c("darkblue","indianred2")
pch <- c(3,4)
with(imdepi, {
  plot(events,pch=pch[events$type],col=colTypes[events$type],add=TRUE)
  legend(x="topleft",levels(events$type),col=colTypes, pch=pch,title="Finetype")
})

# somehow easier: use the plot-method for the epidataCS class
plot(imdepi, aggregate="space", axes=TRUE, colTypes=colTypes)
title(xlab = "x [km]", ylab = "y [km]")

# Show a dynamic illustration of the spatio-temporal dynamics of the 
  # spread during the first year of type B with a step size of 7 days
  animate(imdepiB, interval=c(0,365), time.spacing=7, sleep=0.1)

Run the code above in your browser using DataLab