data("hagelloch")
#Data frame with the original data documented in Oesterle (1992)
head(hagelloch.df)
#Represented as epidata object
summary(hagelloch)
###################################################
#Use data.frame to illustrate the basics
##################################################
#Show case locations as in Neal & Roberts (different scaling) using
#the data.frame
coordinates(hagelloch.df) <- c("HNX","HNY")
plot(hagelloch.df,xlab="x [m]",ylab="x [m]",pch=15,axes=TRUE,cex=sqrt(multiplicity(hagelloch.df)))
#Epicurve
hist(as.numeric(hagelloch.df$tS),xlab="Time (days)",ylab="Cases",main="")
#SIR model information for population & individuals
plot(hagelloch,col=c("green","red","darkgray"))
stateplot(hagelloch, id=c("187"))
#Show a dynamic illustration of the spread of the infection
animate(hagelloch,time.spacing=0.1,legend.opts=list(x="topleft"),sleep=10/550)
#For an analysis of the data see also the example of twinSIR. (@Michael: TODO)
Run the code above in your browser using DataLab