Sequential detection of influenza epidemics by the KolmogorovSmirnov test
 Pau Closas^{1}Email author,
 Ermengol Coma^{2} and
 Leonardo Méndez^{2}
DOI: 10.1186/1472694712112
© Closas et al.; licensee BioMed Central Ltd. 2012
Received: 30 January 2012
Accepted: 24 August 2012
Published: 3 October 2012
Abstract
Background
Influenza is a well known and common human respiratory infection, causing significant morbidity and mortality every year. Despite Influenza variability, fast and reliable outbreak detection is required for health resource planning. Clinical health records, as published by the Diagnosticat database in Catalonia, host useful data for probabilistic detection of influenza outbreaks.
Methods
This paper proposes a statistical method to detect influenza epidemic activity. Nonepidemic incidence rates are modeled against the exponential distribution, and the maximum likelihood estimate for the decaying factor λ is calculated. The sequential detection algorithm updates the parameter as new data becomes available. Binary epidemic detection of weekly incidence rates is assessed by KolmogorovSmirnov test on the absolute difference between the empirical and the cumulative density function of the estimated exponential distribution with significance level 0 ≤ α ≤ 1.
Results
The main advantage with respect to other approaches is the adoption of a statistically meaningful test, which provides an indicator of epidemic activity with an associated probability. The detection algorithm was initiated with parameter λ_{0} = 3.8617 estimated from the training sequence (corresponding to nonepidemic incidence rates of the 20082009 influenza season) and sequentially updated. KolmogorovSmirnov test detected the following weeks as epidemic for each influenza season: 50−10 (20082009 season), 38−50 (20092010 season), weeks 50−9 (20102011 season) and weeks 3 to 12 for the current 20112012 season.
Conclusions
Real medical data was used to assess the validity of the approach, as well as to construct a realistic statistical model of weekly influenza incidence rates in nonepidemic periods. For the tested data, the results confirmed the ability of the algorithm to detect the start and the end of epidemic periods. In general, the proposed test could be applied to other data sets to quickly detect influenza outbreaks. The sequential structure of the test makes it suitable for implementation in many platforms at a low computational cost without requiring to store large data sets.
Keywords
Influenza Sequential methods Statistical test Detection theoryBackground
Influenza is a well known and common human respiratory infection. It is responsible of significant morbidity and mortality every year. The World Health Organization (WHO) estimates that annual epidemics result in about 3 to 5 million cases of severe illness and about 250,000 to 500,000 casualties worldwide[1]. Influenza has a seasonal pattern and in the Northern hemisphere epidemics occurs between November and March.
Sentinel networks covering less than 2% of the population have been the traditional surveillance system. More recently, electronic health records are widely implemented in some regions making available a significant amount of health related data. In Catalonia, primary care doctors have been routinely registering their activity in eCAP (an electronic health recording system) since 2006. This accounts for over 3,500 physicians collecting data of nearly 6 million people (80% of the population)[2, 3]. The data produced is a key source of information that could also be used for surveillance of certain diseases. In 2011 SISAP (the catalan acronym for Information Systems for Primary Care Services) developed a process of extracting health conditions data from eCAP in order to provide information about some diseases. Nowadays, SISAP publishes weekly information about all cases of those infectious diseases, available on Diagnosticat (http://4.sisap.cat/diagnosticat).
Among the large variety of tracked diseases, we focus on influenza. Influenza data on Diagnosticat has shown its validity as compared to the sentinel network data. Its main advantage is that its data is available faster[3], and is thus theoretically better suited for timely activation of emergency responses. More precisely, we are interested in the outbreak detection of such disease by means of a statistical surveillance system[4]. The objective is to provide an indicator as soon as data gives enough evidence to assess the event. Moreover, we seek to apply the developed algorithms to the Diagnosticat’s database. Other influenza surveillance systems reported in the literature are briefly commented in the following. In[5], the authors presented an online tool to analyze epidemiological data. They used nonepidemic training data to fit a timeseries model for the periodic baseline level, thus following a parametric approach for their purposes.[6] proposed a method to detect deviations from the baseline that was based on fitting historical data to a timeseries regression model. Timeseries analysis were also used in the same context in[7]. A weighted moving average algorithm was considered in[8] to monitor the timeseries. In contrast, in the present work we use nonepidemic data to infer the parameters of the probability density function of nonepidemic periods. Therefore, we make no assumptions on the time evolution of the disease and instead we resort to a probabilistic characterization. The work in[9] suggests that nonparametric methods are best suited to influenza modeling, due to its large variability between years. The authors of[9] focused on other features of the influenza cycle rather than disease outbreak, such as the peak after which the influenza incidence starts to decline, and applied the method to a case study in Sweden. More involved methods, combining both approaches, are possible. In[10] a switching Markov model was used with an autoregressive process to model epidemic data and a white Gaussian process for nonepidemic modeling. This method was implemented in a webbased application developed by the same authors and presented in[11]. Other references point to imaginative, yet reliable methods to detect possible epidemic outbreaks. For instance, in[12], Google search queries were used to track influenzalike illness in a population. In a similar fashion, Twitter was used in[13].
This paper presents a statistical surveillance system which provides an automated detection of influenza epidemics. Health resource planning is an application which could benefit from this tool. The proposed method is able to operate online^{a} and it is based on the statistical characterization of nonepidemic influenza incidence rates. A major advantage of this approach is its statistical meaningfulness, and thus detection is not only a binary result but the confidence in its outcome can be assessed in terms of probabilities resorting to hypothesis testing theory. Nonepidemic data is modeled with an exponential distribution, in the vein of[14]. The unique parameter of the distribution is the decaying factor, that is initially estimated by a training data set and sequentially updated as new observations are recorded. Such statistical characterization is used to design a detector based on the onesample KolmogorovSmirnov test. The method was applied to data in the Diagnosticat database to successfully detect influenza activity.
The remainder of the paper is as follows. Diagnosticat is introduced in the following section Then we provide insights on the statistical distribution of influenza incidence rates, as well as how the relevant parameters can be estimated from the observations. The general statistical detector is proposed, and the results for the catalan case study are presented.
Methods
Diagnosticat: an open epidemiological database
Diagnosticat is an openaccess database which contains reports of many diseases occurring in Catalonia, such as influenza, papilloma or chickenpox. The information available in the Diagnosticat database includes all clinical influenza diagnoses codes (ICD10 code) and is obtained weekly from eCAP through an automated process. The website is timely updated a few minutes after every finished epidemiological week (EW). After the extraction, a computer algorithm automatically creates the different tables with the information that is used in the website. No identifiable or personal information on patients is used, maintained or transferred through this system.
Currently, the Diagnosticat’s database is composed of data from 4 influenza seasons. Information is available starting on 2008 and is updated weekly since then. Data is presented as incidence rates per 10^{5} population, a unit that allows comparison of diagnoses over different territories independently of the number of inhabitants. In this work, the EW is a group of seven days that begins on a Sunday and ends on a Saturday.
Although communicable diseases are in general yearly represented, influenza is represented by seasons due to the characteristics of the influenza epidemic. The epidemic usually starts at the end of the year and ends mid of the following year, peaking in December and January. For this reason and to be consistent with the influenza epidemic, Diagnosticat uses graphics by seasons beginning the EW 23 and ending at EW 22 the following year.
Statistical data analysis
and 0 otherwise. Mean and variance are expressed in terms of the parameter λ > 0 as$\mathbb{E}\left\{X\right\}=1/\lambda $ and Var{X} = 1/λ^{2}, respectively[15]. Recall that only a subset of χ_{ t }follows (1), that is those observations taken in nonepidemic weeks. We define this subset as ζ_{ t }⊂ χ_{ t } and its elements$\{{\stackrel{~}{x}}_{1},\dots ,{\stackrel{~}{x}}_{{L}_{t}}\}$ are those from χ_{ t }which were detected (using the herein proposed method for instance) as in nonepidemic periods. We use L_{ t } to denote the total number of nonepidemic weeks up to t.
which is unbiased and asymptotically consistent with variance$\mathrm{Var}\left\{{\widehat{\lambda}}_{t}\right\}\simeq \mathrm{Var}{\left\{X\right\}}^{3}/{L}_{t}$. Notice that${\widehat{\lambda}}_{t}$ is computed using the L_{ t }observations in the nonepidemic period up to the current week t.
Sequential influenza detector
The objective is to build an autonomous detection algorithm that is able to determine whether influenza is active or not based on the records of influenza cases. In the case of Diagnosticat, these observations are weekly received, and thus a weekbyweek detection is provided by the method. As mentioned in[17], such an automated surveillance system needs to fulfill two objectives: timeliness, to ensure that intervention protocols to the epidemic are in time; and sensitivity, to avoid time/effort wasting due to precipitated measures.
The detector is based on the idea that we have a statistical characterization of the influenza incidence rates when not in the epidemic phase. As discussed earlier, these observations follow an exponential distribution with parameter λ estimated as in (4) in batch processing or as in (8) for the sequential treatment of data.
We notice that the test has to be conducted using a single observation, x_{ t }, from the random variable and that the baseline distribution is continuous and completely specified. Although other alternatives might apply, in this type of decision problems we could obtain enhanced performance by resorting on Empirical Density Function (EDF) statistics to assess${\mathcal{H}}_{0}$, as claimed in[18]. Since we have only one observation available, the EDF is directly${\widehat{F}}_{X}\left(x\right)={1}_{\{{x}_{t}\le x\}}$, where 1_{{A}} is the indicator function of an event A, equal to 1 if A is true and 0 otherwise. Here we use the classical KolmogorovSmirnov (KS) nonparametric test[19], which is based on the maximum absolute difference between the EDF and the Cumulative Density Function (CDF) of the reference distribution. The latter is known to be F_{ X }(x;λ) = 1−e^{−λx} for the exponential distribution.
where we used that 0−F_{ X }(x) = 0−1 + e^{−λx} = 1−e^{−λx}when${\widehat{F}}_{X}\left(x\right)=0$.
With this detector, hypothesis${\mathcal{H}}_{0}$ is rejected at a significance level 0 ≤ α ≤ 1 if D ≥ γ_{ α }, where the threshold satisfies$\alpha =\mathbb{P}\left\{D>{\gamma}_{\alpha}\right\}$. Relevant threshold values can be consulted from tables[20, 21] if F_{ X }(x) is completely specified, and from[22] if its parameters should be estimated from data. Notice that the latter is the case here, since λ is estimated.
The result of the hypothesis test is binary. Another useful way of reporting the result of the test are pvalues. Given d, a realization of the random variable D, we recall that the pvalue is defined as the probability of obtaining another realization of the test at least as extreme as d conditional on${\mathcal{H}}_{0}$ being true, mathematically$p=\mathbb{P}\left\{D\ge d\phantom{\rule{1em}{0ex}}{\mathcal{H}}_{0}\right\}$ (or Type I error). Therefore, not only${\mathcal{H}}_{0}$ is rejected if the pvalue of the test is less than α, but p is also quantifying the confidence in such decision. Large pvalues indicate that x_{ t } is likely to be generated from F_{ X }(x), and viceversa.
which is algebraically equivalent to (4). Using (8) instead of (4) has the advantage that new data is processed upon arrival, and thus there is no need to store the complete dataset nor reprocess all data for each new measurement. Initialization of the exponential factor${\widehat{\lambda}}_{0}$ could be computed for instance based on expert, a priori knowledge. In our implementation of the method, we used the nonepidemic weeks in the first influenza season as a training sequence to estimate the value of${\widehat{\lambda}}_{0}$. L_{ t } counts the number of times the null hypothesis was assessed valid up to t, and thus it is also the amount of observations used to estimate λ.
Algorithm Sequential detection of influenza epidemics
1: Initialization t = 1,${\widehat{\lambda}}_{0}$, and L_{0} = 1
2: At time t new data becomes available, x_{ t }
3: Compute statistic$D=\text{max}\left\{1{e}^{{\widehat{\lambda}}_{t1}{x}_{t}},{e}^{{\widehat{\lambda}}_{t1}{x}_{t}}\right\}$
4: if D ≥ γ_{ α }then
5: Reject the null hypothesis ⇒ Flu detected at the tth EW.
6: Keep${\widehat{\lambda}}_{t}={\widehat{\lambda}}_{t1}$ and L_{ t }= L_{t−1}
7: else if D < γ_{ α } then
8: Accept the null hypothesis ⇒ Flu not detected at the tth EW.
9: Set L_{ t }= L_{t−1} + 1, the number of observations used to calculate${\widehat{\lambda}}_{t}$
10: Update${\widehat{\lambda}}_{t}^{1}=\frac{1}{{L}_{t}}\left({\widehat{\lambda}}_{t1}^{1}({L}_{t}1)+{x}_{t}\right)$
11: end if
12: t = t + 1 and go to step 2
Results and discussion
We used the open database described earlier to test the detector. We also validated in this experiment the proposed ML data fitting that characterizes nonepidemic cases as exponentially distributed. At this time of writing, we had available data from the 20082009 to the 20112012 seasons.
The parameter λ was estimated sequentially as in (8). Initially, this value was calculated using data from the first influenza season (i.e., 20082009), as a training sequence for${\widehat{\lambda}}_{0}$, with those observations identified by the Catalan sentinel network as being in the epidemic phase[16] removed from that year’s set χ to form the subset ζ. In particular, incidence rates per 10^{5}population above 20 were not considered. If not otherwise stated, we used 20/10^{5} to train the method, although later in this section we provide a sensitivity analysis with respect to this threshold. The resulting exponential factor was${\widehat{\lambda}}_{0}=3.8617$ for the first year, which was updated as described in the algorithm when new data from EW 23 of the influenza season 20092010 was available.
Start and end of influenza epidemic in EW per season as detected by the method
20082009  20092010  20102011  20112012  

Threshold  Start  End  Start  End  Start  End  Start  End 
10/10^{5}  50  11  38  50  50  9  3  12 
20/10^{5}  50  10  38  50  50  9  3  12 
30/10^{5}  51  8  38  50  50  9  3  12 
40/10^{5}  52  7  38  50  50  9  3  12 
50/10^{5}  52  7  38  50  50  9  3  12 
Sentinel network  51  8  41  51  51  9  4  12 
It is important to notice that in the influenza season 20092010, the A(H1N1) Influenza virus pandemic occurred during autumn in Catalonia, fact that caused a different temporal pattern of influenza epidemics[26]. Recall that similar differences were reported worldwide[27, 28]. That epidemic had higher incidence rates than seasonal influenza and took place some weeks before. The proposed method was also able to cope with this nonseasonal event as its departure from${\mathcal{H}}_{0}$ was similar to that of seasonal influenza.
Indeed, the proposed method can be used in general to the detection of other infectious diseases whose statistical characterization is available. If nonepidemic periods could be characterized by an exponential distribution, the usage of the method is straightforward. Otherwise, if another distribution better fits the data, slight modification of the method should be performed to compare it with the EDF and to update the required parameters of the PDF. A limitation of the method is related to the data gathering method, which has to be continuously recording observations. Since the method is based on nonepidemic data to estimate the distributional parameters and to assess whether the disease is active or not, some systems like sentinels cannot straightforwardly benefit from this tool. Recall, for instance, that sentinels are likely to stop recording data in typically inactive periods of the disease, these inactive periods have an impact in the quality of the estimated distribution of nonepidemic data.
Conclusions
In this paper we proposed an automated method to detect influenza outbreaks from periodically recorded incidence rates. In contrast to setting yearly predefined thresholds to determine influenza outbreaks by data inspection, we presented a detector based on the statistical properties of nonepidemic data. The method can be useful to complement traditional surveillance methods. The algorithm provides a binary signal indicating epidemic activity as well as a quantitative measure (i.e., the pvalue) of its confidence. The method can be executed sequentially and it is selfadjusted (after some initialization of the exponential factor). We presented results with real medical data from Catalonia, showing the performance of the detector even in nonseasonal scenarios, as well as the validity of the exponential modeling for nonepidemic influenza incidence rates. Finally, the objectives required for such an automated system are seen to be fulfilled: timeliness and sensitivity.
Timeliness is generally defined as the difference between the time an event occurs and the time the reference standard for that event occurs. Diagnosticat data is available the instant the epidemiologic week has endend, and thus advances in four days the publication of data over the sentinel network based system in Catalonia. Additionally, the proposed sequential detection method signals the event 1 week earlier on average for the tested data (excluding the AH1N1.pdm.2009 season).
Endnote
^{a} Note that in this work we use online to denote that the algorithm operates sequentially, that is, as new data becomes available.
Abbreviations
 CDF:

Cumulative Density Function
 CLT:

Central Limit Theorem
 CTTC:

Centre Tecnològic de Telecomunicacions de Catalunya
 eCAP:

Electronic health record in Catalonia
 EDF:

Empirical Density Function
 EW:

Epidemiological week
 ICS:

Catalan Institute of Health
 KS:

KolmogorovSmirnov
 ML:

Maximum Likelihood
 PDF:

Probability Density Function
 SISAP:

Information Systems for Primary Care Services
 WHO:

World Health Organization.
Declarations
Acknowledgements
PC has been partially supported by the European Commission in the COST Action IC0803 (RFCSET).
Authors’ Affiliations
References
 Influenza (seasonal). Tech. Rep. Fact sheet no. 211, World Health Organization (WHO) 2009. [http://www.who.int/mediacentre/factsheets/fs211/],
 Coma E, Méndez L: SISAP: 4 años buceando en mares de datos. AMF. 2010, 6 (8): 473476.
 Coma E, Méndez L, Camús J, Medina M: Diagnosticat: a disease surveillance system derived from electronic health record data. Proc. of the European Scientific Conference on Applied Infectious Disease Epidemiology (ESCAIDE). 2011, Stockholm, Sweden, [http://ecdc.europa.eu/en/ESCAIDE/Materials/Presentations/ESCAIDE2011_Session_12_2_Mendez.pdf], [http://ecdc.europa.eu/en/ESCAIDE/Materials/Documents/ESCAIDE2011AbstractBook.pdf∖#page=50],
 Sonesson C, Bock D: A review and discussion of prospective statistical surveillance in public health. J R Stat Soc A. 2003, 166 (1): 521. 10.1111/1467985X.00256.View Article
 Pelat C, Boelle PY, Cowling B, Carrat F, Flahault A, Ansart S, Valleron AJ: Online detection and quantification of epidemics. BMC Med Inf Decision Making. 2007, 7: 19. 10.1186/1472694771. [http://www.biomedcentral.com/14726947/7/29],View Article
 Serfling RE: Methods for current statistical analysis of excess pneumoniainfluenza deaths. Public Health Rep. 1963, 6 (78): 494506.View Article
 Crighton EJ, Moineddin R, Mamdani M, Upshur REG: Influenza and pneumonia hospitalizations in Ontario: a timeseries analysis. Epidemiol Infect. 2004, 132 (6): 11671174. 10.1017/S0950268804002924.PubMed CentralView ArticlePubMed
 Steiner SH, Grant K, Coory M, Kelly HA: Detecting the start of an influenza outbreak using exponentially weighted moving average charts. BMC Med Inf Decision Making. 2010, 10: 3710.1186/147269471037. [http://www.biomedcentral.com/14726947/10/37],View Article
 Bock D, Andersson E, Frisén M: Statistical surveillance of epidemics: peak detection of influenza in Sweden. Biometrical J. 2008, 50 (1): 7185. 10.1002/bimj.200610362.View Article
 MartínezBeneito MA, Conesa D, LópezQuílez A, LópezMaside A: Bayesian Markov switching models for the early detection of influenza epidemics. Stat Med. 2008, 27: 44554468. 10.1002/sim.3320.View ArticlePubMed
 Conesa D, LópezQuilez A, MartínezBeneito M, Miralles M, Verdejo F: FluDetWeb: an interactive webbased system for the early detection of the onset of influenza epidemics. BMC Med Inf Decision Making. 2009, 9: 3610.1186/14726947936. [http://www.biomedcentral.com/14726947/9/36],View Article
 Ginsberg J, Mohebbi MH, Patel RS, Brammer L, Smolinski MS, Brilliant L: Detecting influenza epidemics using search engine query data. Nature. 2009, 9 (457): 10121014. [http://www.nature.com/nature/journal/v457/n7232/suppinfo/nature07634_S1.html],View Article
 Aramaki E, Maskawa S, Morita M: Twitter Catches The Flu: Detecting Influenza Epidemics using Twitter. Proc. of the 2011 Conference on Empirical Methods in Natural Language Processing. 2011, Edinburgh, Scotland, UK: Association for Computational Linguistics, 15681576.
 Rath TM, Carreras M, Sebastiani P: Automated detection of influenza epidemics with Hidden Markov Models. Advances in Intelligent Data Analysis V. 2003, Berlin, Heidelberg: Springer, 521532.View Article
 Papoulis A, Pillai SU: Probability, Random Variables and Stochastic Processes. 2001, New Delhi, India: McGraw–Hill
 Pla dÂ´informació de les infeccions respiratòries agudes a Catalunya (PIDIRAC). Tech. rep., Departament de Salut  Generalitat de Catalunya 2008–2009. [http://www20.gencat.cat/docs/canalsalut/HomeCanalSalut/Professionals/Temes_de_salut/Vigilancia_epidemiologica/documents/pidirac_2008_09.pdf],
 Farrington CP, Andrews NJ, Beale AD, Catchpole MA: A statistical algorithm for the early detection of outbreaks of infectious disease. J R Stat Soc. Ser A (Stat Soc). 1996, 159 (3): 547563. 10.2307/2983331. [http://www.jstor.org/stable/2983331],View Article
 Stephens MA: EDF statistics for goodness of fit and some comparisons. J Am Stat Assoc. 1974, 69 (347): 730737. 10.1080/01621459.1974.10480196.View Article
 Bickel P, Doksum K: Mathematical Statistics: Basic Ideas and Selected Topics, Volume 1. 2001, Upper Saddle River, New Jersey: Prentice Hall
 Massey FJ: The KolmogorovSmirnov test for goodness of fit. J Am Stat Assoc. 1951, 46 (253): 6878. 10.1080/01621459.1951.10500769.View Article
 Miller LH: Table of percentage points of Kolmogorov statistics. J Am Stat Assoc. 1956, 51 (273): 111121. 10.1080/01621459.1956.10501314.View Article
 Pearson E, Hartley H: Biometrika Tables for Statisticians, Volume 2. 1972, England: Cambridge University Press
 Pla dÂ´informació de les infeccions respiratòries agudes a Catalunya (PIDIRAC). Tech. rep., Departament de Salut  Generalitat de Catalunya 2009–2010. [http://www.20.gencat.cat/docs/canalsalut/HomeCanalSalut/Professionals/Temes_de_salut/Vigilancia_epidemiologica/documents/pidirac_2009_10.pdf],
 Pla dÂ´informació de les infeccions respiratòries agudes a Catalunya (PIDIRAC). Tech. rep., Departament de Salut  Generalitat de Catalunya 2010–2011. [http://www.20.gencat.cat/docs/canalsalut/HomeCanalSalut/Professionals/Temes_de_salut/Vigilancia_epidemiologica/documents/Arxius/spfi.pdf],
 Pla dÂ´informació de les infeccions respiratòries agudes a Catalunya (PIDIRAC). Tech. rep., Departament de Salut  Generalitat de Catalunya 2011–2012. [http://www.20.gencat.cat/docs/canalsalut/HomeCanalSalut/Professionals/Temes_de_salut/Vigilancia_epidemiologica/documents/Arxius/spfi.pdf],
 Godoy P, Pumarola T, Martínez A, Torner N, Rodés A, Carmona G, Ciruela P, Caylà J, Tortajada C, Domínguez A, Plasència A: Surveillance of the pandemic influenza (H1N1) 2009 in Catalonia: results and implications. Rev Esp Salud Publica. 2011, 1 (85): 3745.
 Zarocostas J: World Health Organization declares A(H1N1) influenza pandemic. BMJ [Internet]. 2009, 338: b242510.1136/bmj.b2425. [http://www.ncbi.nlm.nih.gov/pubmed/19525308],View Article
 Cook S, Conrad C, Fowlkes AL, Mohebbi MH: Assessing Google Flu trends performance in the United States during the 2009 influenza virus A(H1N1) pandemic. PLoS ONE. 2011, 6 (8): e2361010.1371/journal.pone.0023610.PubMed CentralView ArticlePubMed
 The prepublication history for this paper can be accessed here:http://www.biomedcentral.com/14726947/12/112/prepub
Prepublication history
Copyright
This article is published under license to BioMed Central Ltd. This is an Open Access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.