Description Usage Arguments Details Value Author(s) Source See Also Examples
The function takes range
values of the surveillance time
series disProgObj
and for each time point uses a GLM to
predict the number of counts according to the procedure by
Farrington et al. (1996). This is then compared to the observed
number of counts. If the observation is above a specific quantile of
the prediction interval, then an alarm is raised.
1 2 3 4 5 |
disProgObj |
object of class disProgObj (including the |
control |
Control object
|
The following steps are perfomed according to the Farrington et al. (1996) paper.
fit of the initial model and initial estimation of mean and overdispersion.
calculation of the weights omega (correction for past outbreaks)
refitting of the model
revised estimation of overdispersion
rescaled model
omission of the trend, if it is not significant
repetition of the whole procedure
calculation of the threshold value
computation of exceedance score
An object of class SurvRes
.
M. Höhle
A statistical algorithm for the early detection of outbreaks of infectious disease, Farrington, C.P., Andrews, N.J, Beale A.D. and Catchpole, M.A. (1996), J. R. Statist. Soc. A, 159, 547-563.
algo.farrington.fitGLM
,algo.farrington.threshold
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | #Read Salmonella Agona data
data("salmonella.agona")
#Do surveillance for the last 100 weeks.
n <- length(salmonella.agona$observed)
#Set control parameters.
control <- list(b=4,w=3,range=(n-100):n,reweight=TRUE, verbose=FALSE,alpha=0.01)
res <- algo.farrington(salmonella.agona,control=control)
#Plot the result.
plot(res,disease="Salmonella Agona",method="Farrington")
## Not run:
#Generate random data and convert into sts object
set.seed(123)
x <- matrix(rpois(1000,lambda=1),ncol=1)
sts <- new("sts", observed=x, epoch=1:nrow(x), state=x*0, freq=52)
#Compare timing of the two possible fitters for algo.farrington (here using S4)
system.time( sts1 <- farrington(sts, control=list(range=c(500:1000),
fitFun="algo.farrington.fitGLM.fast")))
system.time( sts2 <- farrington(sts, control=list(range=c(500:1000),
fitFun="algo.farrington.fitGLM")))
#Check if results are the same
sum(upperbound(sts1) - upperbound(sts2))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.