scieee AI-readable full text Open interactive document viewer

Multivariate Adaptive Regression Splines (MARS) for non-linear time series dependence: An application in biostatistics

Pham Thi Van, Ha

Abstract

Over several years, time series analysis using ARIMA modelling has been proposed as a suitable method to investigate the nonlinear relationship between antimicrobial use and resistance. Nonetheless, these studies did not mention the thresholds of antibiotic use to manage the precise prescription. This paper explores using multivariate adaptive regression splines for nonlinear time series to develop models applying monthly antimicrobial resistance and antimicrobial use data. And according to the study of the MARS methodology with the application to antibiotic use and resistance, this type of model is proved to be useful to identify relationships between explanatory and outcome time series. The approach is very flexible and allows for the inclusion of smooth functions, thresholds and lags in the input time series that reflect non-linear dependencies.

Full text

Title: Multivariate Adaptive Regression Splines (MARS) for non-linear time series dependence: An application in biostatistics Author: HA PHAM THI VAN Advisor: Dr. Jose A. Sanchez Espigares Department: School of Mathematics and Statistics University: Universitat Politècnica de Catalunya - BarcelonaTech Academic year: 2020 - 2021 Interuniversity Master in Statistics and Operations Research UPC-UB ii iii Abstract The Multivariate Adaptive Regression Splines (MARS) procedure by Friedman (1991, 1993); MARS procedure has been widely used to estimate relationships between variables in various fields of knowledge. The main advantages of MARS are its capacity to extract complex data mapping in high-dimensional data and produce simple, easy-to-interpret models and its ability to estimate the contributions of the input variables. Besides, MARS has strengths in low-informational demands, ease of reiteration and the capacity to adjust for the non-independence of serial observations and stochasticity inherent to time series (López-Lozano et al.,2019). Using the MARS algorithm avoids imposing linearity assumptions in modelling, enables more flexibility to approach data, and solves the sparseness of data and concavity, which some other non-parametric regression models encounter. Antimicrobials have helped people all over the world improve their health and food security. Bacteria and other pathogens, on the other hand, have often developed to withstand the modern drugs used in medicine to fight them. Since the rate at which new antibiotics are discovered has slowed dramatically in recent years, although antibiotic use has increased, resistance has become a growing issue. Antimicrobial resistance (AMR) threatens many of the most important medical advances. Over several years, time series analysis using ARIMA modelling has been proposed as a suitable method to investigate the nonlinear relationship between antimicrobial use and resistance. Nonetheless, these studies did not mention the thresholds of antibiotic use to manage the precise prescription. This paper explores using multivariate adaptive regression splines for nonlinear time series to develop models applying monthly antimicrobial resistance and antimicrobial use data. iv Acknowledgements First of all, I would like to express my thanks to the professors of the Interuniversity Master's degree in Statistics and Operations Research (MESIO UPC-UB) program for their encouragement and support for two years. In particular, I would like to express my gratitude to Associate Professor Dr José A. Sánchez-Espigares, who supervised my work throughout this year and helped me research information and data. I would also like to express my gratitude to Dr Marta Pere, who answered many questions that clarified important information when I worked on my thesis. Last but not least, I would like to thank my fiance’, Quy Nguyen and my dearest friend Jieying Yi, who encouraged me to get on my feet when I was depressed and ready to give up. Also, special thanks go to my family, who has also given me encouragement, advice and support throughout this honours year. v List of tables Table 1: Correlation matrix between variables in the hospital dataset ......................................... 25 Table 2: The estimates of weights and performance of ARIMA models for output timeseries .... 26 Table 3: Coefficients and p-value of explanatory variables of the model after pre-whitening ..... 28 Table 4: Coefficients and p-value of explanatory variables of the model after removing insignificant variables .................................................................................................................... 29 Table 5: Normality tests for the residual of the LTF model ........................................................... 30 Table 6: Jung Box test for the autocorrelation of residuals of Linear Transfer Function model of the density of Klebsiella pneumonia strains time series and antibiotics consumption classes ..... 31 Table 7: The results of GVC and the relationship between the response and explanatory variables in each iteration of the procedure ................................................................................. 33 Table 8: Equations and coefficients of basic functions of the MARS model built ......................... 35 Table 9: Normality tests for the residual of the MARS model ....................................................... 37 Table 10: Homoscedasticity and Independance tests for residuals of the MARS model .............. 37 Table 11: Jung Box test for the MARS model ................................................................................ 37 vi List of figures Figure 1: Graph of the two truncated linear spline or hinger functions. a. above the threshold, b. below the threshold ........................................................................................................................ 9 Figure 2: The monthly density of Klebsiella pneumonia incidence over time from January 2008 to December 2018 ............................................................................................................................. 23 Figure 3: The time series plot of the dataset................................................................................. 24 Figure 4: Correlation matrix plot between variables in the hospital dataset ................................ 25 Figure 5: Time series plot, QQ plot of plot, ACF and PACF plots for the residual of ARIMA(0,1,1) 26 Figure 6: The cross-correlation function (CCF) of the consumption of some classes of antibiotics with Klebsiella pneumonia incidence density................................................................................ 27 Figure 7: Residual plots for the Linear Transfer function model of the density of Klebsiella pneumonia incidence time series and antibiotics consumption. .................................................. 30 Figure 8: ACF and PACF of residuals and squared residuals for the Linear Transfer Function model of the density of Klebsiella pneumonia strains time series and antibiotics consumption classes . 31 Figure 9: MARS model of CKleb versus each important explanatory variables after the looping run ....................................................................................................................................................... 34 Figure 10: MARS model selection .................................................................................................. 34 Figure 11: Residual plots for the MARS model of the density of Klebsiella pneumonia strains time series and antibiotics consumption classes. .................................................................................. 36 Figure 12: ACF and PACF of residuals and squared residuals for the MARS model of the density of Klebsiella pneumonia strains time series and antibiotics consumption classes ............................ 36 Figure 13: Shortterm and longterm prediction on the test dataset of MARS .......................... 38 Figure 14: Time series plot of the consumption of Cephalosporins and hydroalcoholic solutions and Klebsiella pneumonia incidence density ................................................................................. 39 Figure 15: Mean-Variance plots of 1 differencing and 2 differencing of the density of Klebsiella pneumonia incidence .................................................................................................................... 46 Figure 16:ACF and PACF of 1 and 2 differenciated series of the density of Klebsiella pneumonia incidence ....................................................................................................................................... 47 Content Abstract ........................................................................................................................................... iii Acknowledgements ......................................................................................................................... iv List of tables ..................................................................................................................................... v List of figures ................................................................................................................................... vi Content............................................................................................................................................ 0 1. Introduction ............................................................................................................................. 1 2. Literature reviews .................................................................................................................... 5 3. Methodology ............................................................................................................................ 7 3.1 Multivariate adaptive regression spline ................................................................................ 7 3.2 Transfer function ................................................................................................................. 13 4. Results .................................................................................................................................... 22 5. Discussion and Conclusion ..................................................................................................... 39 Bibliography................................................................................................................................... 42 Appendixes .................................................................................................................................... 45 1 1. Introduction Antimicrobials have helped people all over the world improve their health and food security. Bacteria and other pathogens, on the other hand, have often developed to withstand the modern drugs used in medicine to fight them. Since the rate at which new antibiotics are discovered has slowed dramatically in recent years, although antibiotic use has increased, resistance has become a growing issue. Antimicrobial resistance (AMR) threatens many of the most important medical advances we have made. Negative consequences of antimicrobial resistance are already manifesting themselves across the world. Antibiotic-resistant infections, in most cases, result in more extended hospital stays and more expensive care and the use of more dangerous antibiotics, as well as more significant impairment and death, when opposed to infections that are well-treated with antibiotics. O’Neill study (2014), in a review aimed at estimating the global economic cost of antimicrobial resistance by 2050, revealed that currently claim at least 50,000 lives each year across Europe and the US; and that continued resistance would result in 10 million deaths each year, resulting in a 2% decrease in gross domestic product. Several studies have shown that reducing antimicrobial use in the general population by selecting resistance can effectively reduce AMR. However, over-restriction may be counter-productive; alternative antimicrobial usage may increase response, resulting in new selection pressures or resistance issues. Hence, understanding the effects of antimicrobials on AMR is essential for balancing the benefits and risks of antimicrobials in health care and informing adequate antibiotic prescribing practices. Furthermore, epidemiological data is often provided in the form of time series with frequencies such as weekly, monthly, and yearly, and it becomes evident that stochastic dependence of consecutive measurements may not be disregarded, according to Helfenstein U (1991). Antimicrobial use has a delayed impact on resistance since it takes time for an antimicrobial to change the ecological distribution of strains in a given setting. A delay, consequently, may be seen between the administration of an antibiotic and the spread of resistance. Thus, data of AMR should 2 require the evaluation of time-dependent variables. In addition, time-series analysis could provide a greater understanding of the population dynamics of pathogen transmission and the potential impact of specific interventions targeting these pathogens (Jassim Jirjees F. et al., 2020). Over several years, time series analysis using ARIMA modelling has been proposed by López- Lozano J.M and colleagues (2005) as a suitable method to investigate the relationship between antimicrobial use and resistance. That ARIMA model in the study showed a significant crosscorrelation between the two series with a lag. Furthermore, ARIMA modelling has been used across Europe to study the temporal effects of antibiotic use and infection prevention procedures, for example, in Monnet’s investigation in 2004 or Kaiser K et al., 2009. According to López-Lozano et al.(2019), empirical evidence has considered linear antibiotic use– resistance relationships; however, the use and antimicrobial resistance relationships are nonlinear, based on theoretical and mathematical models by Levy, S. B (1994), Austin, D. J., Kristinsson, K. G. & Anderson, R. M (1999) and Haber, M., Levin, B. R. & Kramarz, P (2010). Selection pressures may only affect resistance rates in places where volumes of antibiotic use in the population are above minimum thresholds. Potential explanations for minimum thresholds include antibiotic substitution with changes in use, associations between the strength of selection pressure and the induction of co-resistance, differential effects on sub-populations within bacterial species or ecological niches, and the ‘total use thresholds’ hypothesis. Nonlinear relationships between fluoroquinolone use and resistant Escherichia coli and Staphylococcus aureus have been reported. In addition, by nonlinear time series analysis, Lawes, T. et al.(2015) showed that reducing antibiotic use to below minimum thresholds predicts shifts in the molecular and clinical epidemiology of S. aureus and Clostridium difficile. The study of Jirjees FJ. et al. (2020) reported that two studies investigated Klebsiella pneumonia. They were of Zou YM et al. ( 2015) and Tansarli GS et al.(2018). Both were applied ARIMA models for time series analysis to verify the relationship between antibacterial usage and bacterial resistance. Tansarli GS focused on colistin usage and the evolution of its resistance in carbapenems-producing Klebsiella pneumoniae bloodstream isolates. Zou YM(2015) tried to 9 a.above the threshold b. below the threshold Figure 1: Graph of the two truncated linear spline or hinger functions. a. above the threshold, b. below the threshold Let 𝐵𝑚(𝑋) m ∈{1,..., M} denote the basis functions, and the MARS model can be summarized in the following equation (3): 𝑦= ∑𝛽𝑚𝐵𝑚(𝑋) 𝑀 𝑚=0 + 𝜀 (3) where 𝐵𝑚(𝑋)={1, 𝑚=1 ∏ℎ𝑗𝑚(𝑥𝑘 𝑗𝑚,𝜏𝑘 𝑗𝑚 𝑚𝑖 𝑗=1 ) 𝑚≥2 (4) am is the coefficient of the mth basis function, determined by the least-squares method. The basis functions are products of up to a maximum interaction order mi truncated linear splines or hinge functions (we usually restrict mi = 2), describing the relationship between one or more explanatory variables and the outcome in terms of segments of stable association separated by knots or threshold values. These interacting hinge functions allow us to identify possible interactions between variables. Namely, for mi = 2, the mth basis function takes one of the following two forms: No interaction: 𝐵𝑚(X)=ℎ𝑚(𝑥𝑘,𝜏𝑘) for some k = 1, . . . , p 10 With interaction: 𝐵𝑚(X)=ℎ𝑚(𝑥𝑘,𝜏𝑘).ℎ𝑚(𝑥𝑗,𝑡𝑗) for some k,j = 1,...,p, ,𝑘≠𝑗 MARS for time series (TSMARS), initiated by Lewis and Stevens (1991), has been extensively explored by Keogh (2006). While SETAR and the self-exciting open-loop threshold autoregressive (TARSO) models of Z., J. and Tong, H., (1992) identify piecewise linear functions over disjoint subregions, with discontinuities at the boundaries of the regions, TSMARS methodology obtains non-linear threshold models continuous in the domain of the predictor variables and with possible interactions among lagged predictor variables. Therefore TSMARS constitutes a further generalization of Tong's models (Chung, 2012). TSMARS seeks to model the dependence of a variable 𝑦𝑡 on a set of explanatory variables (𝑥𝑡1,𝑥𝑡2,…,𝑥𝑡𝑝) where some of these variables may be lagged values of others, i.e. 𝑥𝑡𝑝 might be 𝑥𝑡−1 1for instance). TSMARS procedure approximates this function as:: 𝑦= ∑𝛽𝑚𝐵𝑚(𝑋𝑡) 𝑀 𝑚=0 + 𝜀𝑡 (5) where 𝛽𝑚 is the coefficient for the mth basis function, m = 1, ..., M 𝐵𝑚(𝑋𝑡) is the mth basis function, m = 1, ..., M 𝜀𝑡 is an independently distributed error term with 𝐸(𝜀𝑡)=0 and 𝐸(𝜀𝑡2)=𝜎2 MARS builds a model in two phases: the forward and the backward stepwise procedures. The stepwise forward procedure aims at reducing mean square error (MSE) by using OLS. In this step, MARS starts with a model consisting of intercept term, 𝛽0. And then, an original explanatory variable or a reflected pair of hinge functions that give the maximum reduction in sum-of-squares residual error are selected and added to the model iteratively until the maximum number of terms pre-assigned by users is reached. For details, the MARS algorithm starts with only one basis function 𝐵1(𝑋)=1 in the model, which corresponds to selecting the initial subregion as R1 = D, the whole domain. After the initial step, the algorithm first adds a pair of basis functions: 11 𝐵2(𝑋)=𝐵1(𝑋)max(𝑥𝑘− 𝜏𝑘,0)𝑎𝑛𝑑 𝐵3(𝑋)=−𝐵1(𝑋)max(𝑥𝑘− 𝜏𝑘,0) The pair (𝑥𝑘,𝜏𝑘) is found by minimizing the RSS ∑[𝑦− 𝛽1−𝛽2max(𝑥𝑘− 𝜏𝑘,0)+ 𝛽3max(𝑥𝑘− 𝜏𝑘,0) ]2 𝑝 𝑘 The ordinary least squares method is performed, and the pair (𝑥𝑘,𝜏𝑘) with the minimum RSS is chosen. For the next iteration, a pair of products are included such that 𝐵𝑚(𝑋)max(𝑥𝑘− 𝜏𝑘,0)𝑎𝑛𝑑 −𝐵𝑚(𝑋)max(𝑥𝑘− 𝜏𝑘,0), where 𝐵𝑚(𝑋)is the previously selected basis functions The model shall contain 2M +1 basis functions after the Mth iteration. The next M + 1 iteration adds two new basis functions: 𝐵2𝑀+2(𝑋)=𝐵𝑙(𝑋)max(𝑥𝑘− 𝜏𝑘,0)𝑎𝑛𝑑 𝐵2𝑀+3(𝑋)=−𝐵1(𝑋)max(𝑥𝑘− 𝜏𝑘,0) where 1≤𝑙 ≤2𝑀+1 and 𝐵𝑙(𝑋) is already in the model. Moreover, the process of minimizing RSS is continued. The forward stepwise procedure tends to create a complex model with several basic functions. So it is likely to be overfitting; thus, the backward stepwise procedure is employed to eliminate certain basic functions to improve the model generalization. At this pruning step, the algorithm removes basic functions that contribute less to the model step by step according to the generalized cross-validation (GCV) criterion (Craven and Wahba 1979). Finally, it will stop when the best sub-model is found. The GCV equation is a goodness of fit test that penalizes large numbers of BFs and serves to reduce the chance of overfitting. The GCV criterion is defined below: 𝐺𝐶𝑉(𝑀)= 1 𝑁 ∑[𝑦𝑖−𝑓󰆹𝑀 (𝑋𝑖)]2 𝑁 𝑖=0 [1− 𝐶(𝑀) 𝑁]2 (6) 12 where N is the number of observations, and f(x i )denotes the predicted values of the MARS model, M represents the maximum number of BFs in the model, C(M) is a complexity penalty that increases with the number of BF in the model and which is generally defined as: 𝐶(𝑀)=𝑡𝑟𝑎𝑐𝑒(𝐵(𝐵𝑇𝐵)−1𝐵𝑇)+1 (7) where B denotes the matrix of BFs with dimension M×n. A modified form of 𝐶(𝑀) used in the current MARS algorithm is 𝐶(𝑀)𝑥=𝐶(𝑀)+𝑑𝑀. The quantity of 𝑑 in that form represents a cost for each basic function optimization and is also considered a smoothing parameter. According to Friedman (1991), the optimal value of d is in the range 2 ≤d ≤ 4, and generally, the choice of d = 3 is adequate. If the value of 𝐶(𝑀) is small, a large model including many basic functions is built. Otherwise, a smaller model is obtained. Finally, for a simple model with less lack of fit, the model with minimum GCV is chosen. Therefore, this GCV criterion accounts for the inherent improvement in explaining the variance associated with increasing numbers of basis functions. Furthermore, its calculation allows estimates of the relative importance of each basis function. Hence, the model selection process converges on a set of basic functions that most efficiently explain variation in the dependent variable. Not only does the GCV penalize the number of basic functions, but it also penalizes the number of knots. A basis function is deleted at each deletion step to lower GCV until an appropriately fitted model is established. Because the core functions and changeable knot positions are data-driven and tailored to the task at hand, MARS is an adaptive process. To measure the performance of the MARS models, the coefficient of determination R2, AIC, BIC, root mean squared error RMSE, mean average error MAE, relative root mean squared error RRMSE were used. In this paper, the analyses were performed using the "earth" package in R software (R Foundation for Statistical Computing, Vienna, Austria). This package will evaluate all possible knots through all 13 supplied features by default, then prune to the optimal number of knots based on an estimated shift in R2 (for the training data) of less than 0.001. 3.2 Transfer function In signal processing, communication theory, and control theory, transfer functions are extensively utilized to analyze systems such as single-input single-output filters. However, the term is frequently applied solely to linear, time-invariant systems (LTI). Although most real systems have non-linear input/output characteristics, many systems exhibit behaviour close enough to linear when operated within nominal parameters (not "over-driven"). And LTI system theory is an acceptable approximation of the input/output behaviour. Box and Jenkins (1976) developed this paradigm for time series analysis. According to Box and Jenkins (1976), the transfer function model combines a time series approach with a causal approach. The time series 𝑥𝑡 influences the time series 𝑦𝑡 through a transfer function that distributes the impact of 𝑥𝑡 through some period in the future. The resulting model is called the transfer function model, which connects the output series 𝑦𝑡, the input series 𝑥𝑡 and noise 𝑛𝑡. The correlation between the input X and the output Y is also called the cross-correlation. The generalized form of the function can be shown as below: 𝑌𝑡=𝑣(𝐵) 𝑋𝑡+ 𝑁𝑡 (8) where 𝑣(𝐵)= 𝜔(𝐵) 𝛿(𝐵)𝐵𝑏 (9) 𝜔(𝐵)= 𝜔0−𝜔1𝐵−𝜔2𝐵2−⋯−𝜔𝑠𝐵𝑠 (10) 𝛿(𝐵)= 𝛿0−𝛿1𝐵−𝛿2𝐵2−⋯−𝛿𝑟𝐵𝑟(11) where 𝜔(𝐵) is the numerator polynomial, 𝛿(𝐵)is the denominator polynomial, and 𝑋𝑡 is the explanatory variable, 𝑁𝑡 is the independent noise term generated by an ARIMA process. 14 𝜔(𝐵) 𝛿(𝐵) is called the transfer function. The concept of a transfer function model is like passing the input series through a stochastic-dynamic filter to generate the output series. If the time series is non-stationary, however, an adequate amount of differencing should be added to establish stationarity. In actuality, to create a transfer function model, stationary dependent and explanatory variables are required. As a result, the transfer function model can be more generally expressed as the following: 𝑦𝑡=𝜔(𝐵) 𝛿(𝐵)𝐵𝑏 𝑥𝑡+𝜃(𝐵)𝜗(𝐵) 𝜑(𝐵)𝜓(𝐵) 𝛼𝑡 (12) where 𝑦𝑡=(1−𝐵)𝑑((1−𝐵𝑙)𝐷 𝑌𝑡 (13) 𝑥𝑡=(1−𝐵)𝑑′((1−𝐵𝑙)𝐷′ 𝑋𝑡 (14) where 𝐷 and 𝑑 are orders of regular and seasonal differencing that transform non-stationary 𝑌𝑡 to stationary 𝑦𝑡 ; 𝐷′ and 𝑑′ are orders of regular and seasonal differencing that transform nonstationary 𝑋𝑡 to stationary 𝑥𝑡 ; l is the period of seasonality; 𝜃(𝐵)𝜗(𝐵) 𝜑(𝐵)𝜓(𝐵) is an ARIMA process that transfer noise term 𝑁𝑡 to white noise 𝛼𝑡 . Two principal assumptions of the transfer function model described in Equation 4 are: - The relationship between 𝑋𝑡 and 𝑌𝑡 is unidirectional. That is, the input series can affect the response variable, but not conversely. - The input series and the noise component of the model are assumed to be independent of each other. Liu et al.(1992) also pointed out that the modelled system must be assumed to be stable. Another tacit assumption that considers that if the input series are stationary, the sum of the TP weights is finite. Also, the transfer function weights will decay to zero after some lags to ensure stability. 15 There are three stages involved in the building of transfer function models. They are identification, estimation, and diagnostic checking. They were first proposed by Box and Jenkins(1976) and first used in building the ARIMA model. In transfer function modelling, the identification stage is the most challenging. The analyst must first find preliminary estimates of the parameters. Then, these estimates must be used to determine the form of the transfer function model and the ARMA model of the noise model involved. In the same way that the autocorrelation function is used to identify stochastic models for univariate time series. The data analysis tool employed to identify transfer function models is the cross-correlation function between the input and output. The usual formula defines the autocovariance coefficients of each of the two series at lag: 𝛾𝑋𝑋(𝑘)=𝐸[(𝑥𝑡−𝜇𝑥)(𝑥𝑡+𝑘−𝜇𝑥)]=𝐸[(𝑥𝑡−𝜇𝑥)(𝑥𝑡−𝑘−𝜇𝑥)] (15) 𝛾𝑌𝑌(𝑘)=𝐸[(𝑦𝑡−𝜇𝑦)(𝑦𝑡+𝑘−𝜇𝑦)]=𝐸[(𝑦𝑡−𝜇𝑦)(𝑦𝑡−𝑘−𝜇𝑦)] (16) The cross-covariance coefficients between two stationary stochastic processes 𝑥𝑡 and 𝑦𝑡 series at lag + 𝑘: 𝛾𝑋𝑌(𝑘)=𝐸[(𝑥𝑡−𝜇𝑥)(𝑦𝑡+𝑘−𝜇𝑦)] (17) The cross-covariance coefficients between the 𝑦𝑡 and 𝑥𝑡 series at lag + 𝑘: 𝛾𝑌𝑋(𝑘)=𝐸[(𝑦𝑡−𝜇𝑦)(𝑋𝑡+𝑘−𝜇𝑥)] (18) In general, 𝛾𝑋𝑌(𝑘)will not be the same as 𝛾𝑌𝑋(𝑘), nonetheless, we can note that: 𝛾𝑋𝑌(𝑘)=𝐸[(𝑥𝑡−𝜇𝑥)(𝑦𝑡+𝑘−𝜇𝑦)] = 𝐸[(𝑦𝑡−𝜇𝑦)(𝑋𝑡−𝑘−𝜇𝑥)] =𝛾𝑌𝑋(−𝑘) (19) Thus, the function 𝛾𝑋𝑌(𝑘)=𝑐𝑜𝑣[𝑥𝑡,𝑦𝑡+𝑘] for 𝑘=0,±1,±2… is called the cross-variance function for the stationary bivariate process. And the correlation between 𝑥𝑡 and 𝑦𝑡+𝑘 given by 𝜌𝑌𝑋(𝑘)=𝛾𝑋𝑌(𝑘) 𝜎𝑥𝜎𝑦 (20) 16 is called the cross-correlation function of the stationary bivariate process. Since 𝜌𝑥𝑦(𝑘) is not generally equal to 𝜌𝑥𝑦(−𝑘), the cross-correlation function, in contrast to the autocorrelation function, is not symmetric about 𝑘 = 0. As mentioned above, one of the assumptions stated the requirement that both input and output series need to be stationary. Therefore, after suitable differencing of both series, n= N-d pairs of values would be used for analysis. An estimate of the cross-covariance function at lag k would be then provided by: 𝑐𝑋𝑌(𝑘)= { 1 𝑛∑(𝑥𝑡−𝑥)(𝑦𝑡+𝑘−𝑦) 𝑛−𝑘 𝑡=1 1 𝑛∑(𝑦𝑡−𝑦)(𝑥𝑡−𝑘−𝑥) 𝑛+𝑘 𝑡=1 (21) where 𝑥 and 𝑦 are the means of the series x and y, respectively. And the estimates of the cross-correlation coefficient 𝜌𝑥𝑦(𝑘) at lag 𝑘 yield: 𝑟𝑋𝑌(𝑘)=𝑐𝑋𝑌(𝑘) 𝑠𝑥𝑠𝑦 (22) where 𝑠𝑥 ,𝑠𝑦 are estimates of 𝜎𝑥 ,𝜎𝑦. Hence, the cross-correlation function was used to detect orders of the model, including delay order b, numerator polynomial order s, denominator polynomial order r. The autocorrelation in the input series, on the other hand, is frequently responsible for the spurious effects. So then, a pre-whiten filter is used to counteract this spurious impact. The prewhiten filter's fundamental premise is to convert the input variable to a white noise process. In other words, the autocorrelation in the input variable series was removed. Pre-whitening begins with identifying and fitting an ARIMA model to the stationary input data 𝑋𝑡. The input data in an appropriate ARIMA model might be written in as below: 𝜃(𝐵)𝜗𝑃(𝐵𝑙)𝑥𝑡= 𝜑(𝐵)𝜓𝑄(𝐵𝑙)𝑎𝑡(23) 17 Thus, 𝛼𝑡=𝜃(𝐵)𝜗𝑃(𝐵𝑙) 𝜑(𝐵)𝜓𝑄(𝐵𝑙) 𝑥𝑡 (24) After pre-whitening the input data, the stationary output data 𝑌𝑡 must be pre-whitened. That step will be done by filtering the output data through the same ARIMA model used to fit the input data with the same model parameters. Equivalently, by substituting 𝑥𝑡 by 𝑦𝑡 in Equation 24 to obtain the filtering equation for the pre-whitened output, as shown below: 𝛽𝑡=𝜃(𝐵)𝜗𝑃(𝐵𝑙) 𝜑(𝐵)𝜓𝑄(𝐵𝑙) 𝑦𝑡(25) The constants time delay order b, the denominator polynomial order r, and numerator polynomial order s is determined by the plot pattern of cross-correlation function between 𝛼𝑡 and 𝛽𝑡. In order to determine the value of b, r, and s, it is required: - It should be emphasized here that all the cross-correlation for negative should be insignificant. Since the model assumed that the input variable affects the output variable, no feedback effects exist. - The time delay order b is identified by the first significant spike lag indicates. - The r-value specifies how long the output series 𝑦𝑡has been associated with the output series' initial value. The value of r can be seen in the plot of autocorrelation 𝑦𝑡 ,alternatively, determined by the plot pattern of lag (b + s); if the plot pattern is exponential, then r = 1; if it is a sine wave, r = 2. - The number of lags between the first spike in the CCF and the start of the apparent damping down pattern is equal to the numerator polynomial order s. Thus, for example, if the initial spike occurs at lag two and the CCF decays after lag 4, s = 4- 2 = 2 is the case. At this point, the transfer function model parameters are computed using the specified model orders. 18 The error term should be examined once the model has been determined. For example, suppose the error series has high autocorrelation; in that case, an ARIMA model should be used to detect and fit the error series before being integrated into the overall model in Equation 8. The autocorrelation function (ACF) and partial autocorrelation function (PACF) of the error can be used to identify the model. Initial parameter estimation is the initial value of the non-linear least square’s estimation algorithms. The next step is to form the final estimate for the model parameters carried out iteratively. The process is repeated until it is convergent. Non-linear least-squares estimation is to estimate the parameters obtained by minimizing: 𝑆(𝛿,𝜔,𝜃|𝑏)= ∑𝛼𝑡2 𝑛 𝑡 (26) The behaviour of the residual 𝑎𝑡 and sample cross-correlation (SCC) between at and t are used to perform goodness of fit assessments (residual and input). The model is adequate since the residual is random, and there are no SCC values that are considerably different from zero. The Box-Pierce Q statistic test may be used to determine if the residual is independent of the input and whether there is no association between the input and the residual. In the study of Juszczyk, M et al. (2018), the transfer function model may be further enlarged to incorporate multivariate explanatory variables. ). If there are two or more independent variables, the cross-correlation to identify a transfer function relating the dependent variable to each independent variable. The model development process is guided by Box and Jenkins (1976) 's strategy. So, for the dataset with more than one time series (𝑥1𝑡,𝑥2𝑡,…𝑥𝑞𝑡) to estimate the dependant variable of another time series 𝑦𝑡, the function can be written as: 𝑦𝑡=𝜔1(𝐵) 𝛿1(𝐵)𝐵𝑏𝑡 𝑥1𝑡 + 𝜔2(𝐵) 𝛿2(𝐵)𝐵𝑏𝑡 𝑥2𝑡+ ...+ 𝑞(𝐵) 𝛿𝑞(𝐵)𝐵𝑏𝑡 𝑥𝑞𝑡+𝛼𝑡 (27) where 𝜔(𝐵) is the numerator polynomial, 𝛿(𝐵)is the denominator polynomial, 𝜔𝑗(𝐵) and 𝛿𝑗(𝐵) can be detected by inspecting the cross-correlation between pre-whitened 𝑦𝑡 and 𝑥𝑗𝑡. 25 Figure 4: Correlation matrix plot between variables in the hospital dataset Table 1: Correlation matrix between variables in the hospital dataset cKleb cCARBA cCEFARES ALCBED ABX cFQ cKleb 1 0.622251 0.185185 -0.54139 0.579424 0.438967 cCARBA 0.622251 1 0.255101 -0.67616 0.775639 0.656013 cCEFARES 0.185185 0.255101 1 -0.30099 0.172578 -0.08279 ALCBED -0.54139 -0.67616 -0.30099 1 -0.76303 -0.62135 ABX 0.579424 0.775639 0.172578 -0.76303 1 0.863939 cFQ 0.438967 0.656013 -0.08279 -0.62135 0.863939 1 In the transfer function modelling, it is required that both input and output series are stationary. If the processes are non-stationary, it is assumed that stationarity can be induced by suitable differencing. 26 Mean-variance plots for cKleb reveals that one differencing is needed for that variable. (Appendix A) and ACF and PACF plots (Appendix B) show that PACF has decreasing pattern somehow, and ACF has one different from 0 (next to the origin), meaning MA(1). Furthermore, the plot revealed that AR(1) is the model that should be considered. According to the performance of 3 model ARIMA(0,1,1), ARIMA(1,1,1), and ARIMA(1,1,0) ( in Table 2 and Figure 5), we continue with ARIMA(0,1,1). Table 2: The estimates of weights and performance of ARIMA models for output timeseries Model Parameter Estimates Standard error P- value Sigma squared estimated AIC ARIMA(1,0,0) ar1 -0.488747 0.091474 9.14E-08 0.09738 49.55 ARIMA(0,1,1) ma1 -0.68072 0.10506 9.21E-11 0.08898 41.87 ARIMA(1,1,1) ar1 0.14026 0.28054 0.6171 0.0886 43.7 ma1 -0.80635 0.24632 0.001062 Figure 5: Time series plot, QQ plot of plot, ACF and PACF plots for the residual of ARIMA(0,1,1) 27 Figure 6: The cross-correlation function (CCF) of the consumption of some classes of antibiotics with Klebsiella pneumonia incidence density. The pre-whitened series are analyzed by using the cross-correlation function (CCF). The lag parameter (b) can be directly identified based on the CCF graph. The CCFs for the Klebsiella pneumonia strains rate over the number of stays, and the input variables are shown in Figure 6. Following the Box- Jenkins transfer function modelling strategy is shown, the effect of Carbapenems consumption on Klebsiella pneumonia incidence density is significant at lag 1 and lag 9 (b = 4 and b=9). Similarly, based on the results shown, the use of hydroalcoholic solutions significantly impact Klebsiella pneumonia at lag 12; however, for 12-month is not a good lag to consider, so another lag which is highest correlated in the period of twelve months, lag 3 (b = 3) is chosen. The lag 6 of the Flujorquinolones consumption series also has an impact on the output. The total consumption of all antibiotics contained four significant autoregressive terms of orders 1, 3, 6 and 7 months. 28 Thus, after pre-whitenning, we have at least nine lags; each input series was used to create equivalent nine lag variables to identify the best model further. In the next step, the linear transfer model is applied with lag variables which are the ones selected by the CCF. They are: cCARBA_lag_1, cCARBA_lag_9, cCEFARES_lag_3, ALCBED_lag_3, ABX_lag_1 , ABX_lag_3, ABX_lag_6, ABX_lag_7, cFQ_lag_6. The model result in estimated sigma squared equal to 0.04832, log-likelihood at 6.56, AIC with 24.88. Furthermore, the coefficients and p-value of explanatory variables are shown below: Table 3: Coefficients and p-value of explanatory variables of the model after pre-whitening Estimate Std.Error z P- value Pr(>|z|) ar1 0.01528 0.12206 0.1252 0.90035 ar2 -0.0764 0.11804 -0.6477 0.51721 ar3 0.40973 0.11189 3.662 2.50E-04 ar4 0.00564 0.11704 0.0482 0.96157 ar5 0.32132 0.11905 2.6989 6.96E-03 ar6 -0.2765 0.13532 -2.0436 4.10E-02 ar7 -0.298 0.15038 -1.9816 0.04752 ar8 -0.2115 0.16913 -1.2503 0.21118 ar9 -0.0151 0.15066 -0.1005 0.91991 cCARBA_lag_1 0.00521 0.00316 1.6452 0.09994 cCARBA_lag_9 0.00261 0.00304 0.8588 0.39048 cCEFARES_lag_3 0.0021 0.00106 1.9906 4.65E-02 ALCBED_lag_3 -0.0042 0.00297 -1.4126 0.15779 ABX_lag_1 0.00084 0.00045 1.8638 0.06235 ABX_lag_3 -0.001 0.00037 -2.8227 0.00476 ABX_lag_6 0.00028 0.00042 0.6656 0.50567 ABX_lag_7 0.00045 0.00043 1.0411 0.29782 cFQ_lag_6 -0.0002 0.00119 -0.2088 0.83457 29 Apparently, some variables are not significant, and the current model is complicated. So, to simplify the model, a procedure is created to remove insignificant variables. Furthermore, the model is updated. The result of the model revealed that sigma squared is estimated equal to 0.05297, and the log-likelihood is 2.84, and the AIC is reduced to 14.32, meaning that it is a better model. Table 4: Coefficients and p-value of explanatory variables of the model after removing insignificant variables Estimate Std.Error z P- value Pr(>|z|) ar3 0.33476 0.09832 3.4049 6.62E-04 ar5 0.25865 0.09494 2.7243 0.00644 ar6 -0.2134 0.10488 -2.0348 4.19E-02 ar7 -0.39 0.12726 -3.0643 2.18E-03 cCEFARES_lag_3 0.00267 0.00093 2.873 0.00407 ALCBED_lag_3 -0.0069 0.00198 -3.4865 0.00049 ABX_lag_1 0.00091 0.00133 0.6834 0.49437 ABX_lag_3 -0.0008 0.00113 -0.7364 0.46152 ABX_lag_7 0.00093 0.00154 0.6048 0.54532 Although lag variables of the consumption of the total antibiotic agents have p-values greater than 0.05, meaning that they are significant to the model, the final linear transfer model is represented as follows: (1 – 0.33𝐵3− 0.3𝐵5+ 0.25𝐵6+0.42𝐵7)𝑐𝐾𝑙𝑒𝑏 =0.00267𝑐𝐶𝐸𝐹𝐴𝑅𝐸𝑆𝑙𝑎𝑔3− 0.0069ALCBEDlag3 + 0.000671ABXlag1−0.00106 ABXlag3+0.0008ABXlag7+𝜀 because that AIC and estimated squared residuals’ value rose after removing those variables from the model. After all, because the model is a linear transfer function, the validation for the model's residual is needed to check for the assumption. The result of residual validation are shown in : 30 Figure 7: Residual plots for the Linear Transfer function model of the density of Klebsiella pneumonia incidence time series and antibiotics consumption. Table 5: Normality tests for the residual of the LTF model Shapiro-Wilk normality test data: residual W = 0.98545, p-value = 0.492 Anderson-Darling normality test data: residual A = 0.30793, p-value = 0.5535 In Figure 7, there is not a clear pattern in the residual versus fitted value plots. QQ-plot and histogram of the residuals seem to show that the residuals are normally distributed, except for some outliers. In addition, Shapiro- Wilk test and the Anderson-Darling test has a p-value more than 0.05, meaning that the null hypothesis can not be rejected; the residuals follow the normality distribution. 31 Figure 8: ACF and PACF of residuals and squared residuals for the Linear Transfer Function model of the density of Klebsiella pneumonia strains time series and antibiotics consumption classes Durbin-Watson test data: resid(model) ~ I(1:length(resid(model))) DW = 1.8538, p-value = 0.2188 Alternative hypothesis: true autocorrelation is greater than 0 Table 6: Jung Box test for the autocorrelation of residuals of Linear Transfer Function model of the density of Klebsiella pneumonia strains time series and antibiotics consumption classes lag.df statistic p.value 1 0.432245 0.51089 2 0.432757 0.80543 3 0.439822 0.931899 4 0.454382 0.977787 12 10.39253 0.581566 24 19.56742 0.721091 36 26.48229 0.876718 48 36.06596 0.897439 32 Although there are some lags out of the confident interval in the ACF plots of squared residual in Figure 8, the Durbin-Watson test and p-values from the Jung-Box test reveal that no correlation is presented in residuals. Homoscedasticity Test Studentized Breusch-Pagan test data: resid(model) ~ I(1:length(resid(model))) BP = 12.877, df = 1, p-value = 0.0003326 Residuals are not centred around zero, but a nearly horizontal line is somehow observed in the square root of the absolute residual plot ( Figure 8). So the variance of the residuals can not be considered constant. However, the p-value of the Studentized Breusch-Pagan test is not less than 0.05; we fail to reject the null hypothesis. Thus, we do not have sufficient evidence to say that heteroscedasticity is present in the model. Finally, we can consider it as a VALID model. MARS model: According to the transfer function model results, the final model reveals that the maximum value of the lag term in explanatory variables is seven. However, in the MARS model, each input series was used to create equivalent six lag variables to identify the best model further. Because the combinatorial problem is a bit hard for the MARS method when including lags of higher order than 6. And lags of order 7 and higher represent effects that acts more than half a year after the modification. So, for the non-linear part we consider only lags within the 6 previous months. The MARS models estimated were trained with different terms ranging from 1 to 15 and different nodes with the range of 3 to 16, with 80% of the data as training and 20% validation. 33 For estimating the performance of these models, the generalized cross-validation (GCV) criterion for the combination of each term and each knot is considered as criteria. These values allow us to estimate which models have better performance. Table 7: The results of GVC and the relationship between the response and explanatory variables in each iteration of the procedure knot_list term _list gcv_list expl_list 3 1 0.088034 cKleb~cCARBA 5 1 0.088034 cKleb~cCARBA 3 1 0.085912 cKleb~cCEFARES_lag_6 5 1 0.085912 cKleb~cCEFARES_lag_6 7 1 0.085912 cKleb~cCEFARES_lag_6 5 2 0.079866 cKleb~cCEFARES_lag_6+cCARBA 7 2 0.079866 cKleb~cCEFARES_lag_6+cCARBA 7 2 0.079859 cKleb~cCEFARES_lag_6+cKleb_lag_2 9 2 0.079859 cKleb~cCEFARES_lag_6+cKleb_lag_2 13 2 0.079859 cKleb~cCEFARES_lag_6+cKleb_lag_2 5 2 0.075044 cKleb~cCEFARES_lag_6+ALCBED_lag_2 7 3 0.073906 cKleb~cCEFARES_lag_6+ALCBED_lag_2+cCARBA 11 3 0.073906 cKleb~cCEFARES_lag_6+ALCBED_lag_2+cCARBA 9 3 0.070183 cKleb~cCEFARES_lag_6+ALCBED_lag_2+cKleb_lag_2 9 3 0.070022 cKleb~cCEFARES_lag_6+ALCBED_lag_2+cKleb_lag_6 11 3 0.068633 cKleb~cCEFARES_lag_6+ALCBED_lag_2+cKleb_lag_6 9 4 0.06701 cKleb~cCEFARES_lag_6+ALCBED_lag_2+cKleb_lag_6+ABX 13 4 0.06701 cKleb~cCEFARES_lag_6+ALCBED_lag_2+cKleb_lag_6+ABX 9 4 0.066537 cKleb~cCEFARES_lag_6+ALCBED_lag_2+cKleb_lag_6+cFQ 13 4 0.066537 cKleb~cCEFARES_lag_6+ALCBED_lag_2+cKleb_lag_6+cFQ 11 4 0.063366 cKleb~cCEFARES_lag_6+ALCBED_lag_2+cKleb_lag_6 +cKleb_lag_2 13 4 0.063318 cKleb~cCEFARES_lag_6+ALCBED_lag_2+cKleb_lag_6 +cKleb_lag_2 15 4 0.061831 cKleb~cCEFARES_lag_6+ALCBED_lag_2+cKleb_lag_6 +cKleb_lag_2 The procedure of running the model with different terms and different nodes on the training dataset stopped five terms when the GCV could not be reduced. The procedure started with the simple model of Ckleb concerning cCARBA. After each iteration, the loop found the better models with GCV. 34 And then, adding other lag variables made the model have better performance. Finally, the best model found in the procedure was the model of cKleb~ cCEFARES_lag_6 + ALCBED_lag_2 + cKleb_lag_6 + cKleb_lag_2, with 4 terms and 15 knots. Figure 9: MARS model of CKleb versus each important explanatory variables after the looping run Figure 10: MARS model selection 41 by 0.1022613 times. Finally, if the level of hydroalcoholic solutions of the past 2-months used more than 27.74, the density of Klebsiella pneumonia incidence will continue to drop by 0.0235818. The discoveries in this study might significantly impact how public health policies on antibiotic stewardship are designed. Minimum thresholds should be considered as an upper limit for "safe" antibiotic usage that does not appear to raise resistance rates significantly. Moreover, they might serve as quantifiable objectives for balancing the requirement for access to medicines with resistance management. In conclusion, according to the study of the MARS methodology on antibiotic use and resistance, this type of model is useful to identify relationships between explanatory and outcome time series. The approach is very flexible and allows for the inclusion of smooth functions, thresholds and lags in the input time series that reflect non-linear dependencies. There are several limitations of this study. One of those is to evaluate the consistency of thresholds for specific antibiotic use-resistance by doing a simulation for the dataset and dig deeper into defining factors that have an impact on thresholds. Moreover, another is that the performance in time series prediction of the MARS model should be investigated. In the future, potential prospective studies could be carried out to explore the application of MARS to time series analysis. 42 Bibliography 1. BOX, G.E.P.; JENKINS, G.M, Time Series Analysis Forecasting and Control, 5th ed.; Wiley: Hoboken, NJ, USA, 1976. 2. FRIEDMAN, JEROME H., 1991, Multivariate Adaptive Regression Splines. The Annals of Statistics. 1991. Vol. 19, no. 1. DOI 10.1214/aos/1176347963. Institute of Mathematical Statistics 3. FRIEDMAN, JEROME H and ROOSEN, CHARLES B, 1995, An introduction to multivariate adaptive regression splines. Statistical Methods in Medical Research. 1995. Vol. 4, no. 3, p. 197-217. DOI 10.1177/096228029500400303. SAGE Publications 4. FRIEDMAN, JEROME H.,1993. Fast MARS. Technical Report, Stanford University Department of Statistics, 1993. URL: http://scholar.google.com/scholar?hl=en&btnG=Search&q=intitle:Fast+MARS#0. 5. HASANAH, YULIANTI, HERLINA, MARIZSA and ZAIKARINA, HILDA, 2013, Flood Prediction using Transfer Function Model of Rainfall and Water Discharge Approach in Katulampa Dam. Procedia Environmental Sciences. 2013. Vol. 17, p. 317-326. DOI 10.1016/j.proenv.2013.02.044. Elsevier BV 6. HELFENSTEIN, ULRICH, 1991, The Use of Transfer Function Models, Intervention Analysis and Related Time Series Methods in Epidemiology. International Journal of Epidemiology. 1991. Vol. 20, no. 3, p. 808-815. DOI 10.1093/ije/20.3.808. Oxford University Press (OUP) 7. JIRJEES, FERAS, AL-OBAIDI, HALA, SARTAJ, MUHAMMAD, CONLON-BINGHAM, GERALDINE, FARREN, DAVID, SCOTT, MICHAEL, GOULD, IAN, LÓPEZ-LOZANO, JOSÉ and ALDEYAB, MAMOON, 2021, Antibiotic use and resistance in hospitals: time-series analysis strategy for determining and prioritising interventions. University of Huddersfield Research Portal [online]. 2021. [Accessed 2 April 2021]. Available from: https://pure.hud.ac.uk/en/publications/antibiotic-use-and-resistance-in-hospitals-time- series-analysis-s 8. JUSZCZYK, MICHAŁ and LEŚNIAK, AGNIESZKA, 2019, Modelling Construction Site Cost Index Based on Neural Network Ensembles. Symmetry. 2019. Vol. 11, no. 3, p. 411. DOI 10.3390/sym11030411. MDPI AG. 9. KAIER, KLAUS, HAGIST, CHRISTIAN, FRANK, UWE, CONRAD, ANDREAS and MEYER, ELISABETH, 2009, Two Time-Series Analyses of the Impact of Antibiotic Consumption and Alcohol-Based Hand Disinfection on the Incidences of Nosocomial Methicillin- ResistantStaphylococcus aureusInfection andClostridium difficileInfection. Infection Control & Hospital Epidemiology. 2009. Vol. 30, no. 4, p. 346-353. DOI 10.1086/596605. Cambridge University Press (CUP). 10. KEOGH, G., 2006. Univariate time series modelling and forecasting using TSMARS. Doctor of Philosophy (Ph.D.). Trinity College (Dublin, Ireland). School of Computer Science & Statistics, 2006. 43 11. LAWES, TIMOTHY, LOPEZ-LOZANO, JOSÉ-MARÍA, NEBOT, CESAR A, MACARTNEY, GILLIAN, SUBBARAO-SHARMA, RASHMI, DARE, CERI RJ, WARES, KAREN D and GOULD, IAN M, 2015, Effects of national antibiotic stewardship and infection control strategies on hospital-associated and community-associated meticillin-resistant Staphylococcus aureus infections across a region of Scotland: a non-linear time-series study. The Lancet Infectious Diseases. 2015. Vol. 15, no. 12, p. 1438-1449. DOI 10.1016/s1473- 3099(15)00315-1. Elsevier BV. 12. LEWIS, P. A. W. and STEVENS, J. G., 1991, Nonlinear Modeling of Time Series Using Multivariate Adaptive Regression Splines (MARS). Journal of the American Statistical Association. 1991. Vol. 86, no. 416, p. 864-877. DOI 10.1080/01621459.1991.10475126. Informa UK Limited. 13. LIU, LON-MU, 1992, Forecasting and time series analysis using the SCA statistical system. DeKalb, Ill. : Scientific Computing Associates. 14. LÓPEZ-LOZANO, JOSÉ-MARıA, MONNET, DOMINIQUE L, YAGÜE, ALBERTO, BURGOS, AMPARO, GONZALO, NIEVES, CAMPILLOS, PILAR and SAEZ, MARC, 2000, Modelling and forecasting antimicrobial resistance and its dynamic relationship to antimicrobial use: a time series analysis. International Journal of Antimicrobial Agents. 2000. Vol. 14, no. 1, p. 21-31. DOI 10.1016/s0924-8579(99)00135-1. Elsevier BV . 15. LÓPEZ-LOZANO, JOSÉ-MARÍA, LAWES, TIMOTHY, NEBOT, CÉSAR, BEYAERT, ARIELLE, BERTRAND, XAVIER, HOCQUET, DIDIER, ALDEYAB, MAMOON, SCOTT, MICHAEL, CONLONBINGHAM, GERALDINE, FARREN, DAVID, KARDOS, GÁBOR, FÉSŰS, ADINA, RODRÍGUEZBAÑO, JESÚS, RETAMAR, PILAR, GONZALO-JIMÉNEZ, NIEVES and GOULD, IAN M., 2019, A nonlinear time-series analysis approach to identify thresholds in associations between population antibiotic use and rates of resistance. Nature Microbiology. 2019. Vol. 4, no. 7, p. 1160-1172. DOI 10.1038/s41564-019-0410-0. Springer Science and Business Media LLC. 16. MONNET, D.L., LÓPEZ-LOZANO, J.-M., CAMPILLOS, P., BURGOS, A., YAGÜE, A. and GONZALO, N., 2001, Making sense of antimicrobial use and resistance surveillance data: application of ARIMA and transfer function models. Clinical Microbiology and Infection. 2001. Vol. 7, p. 29-36. DOI 10.1046/j.1469-0691.2001.00071.x. Elsevier BV . 17. O’Neill, J. (2015) Review on Antimicrobial Resistance. Tackling a Crisis for the Health and Wealth of Nations. - References - Scientific Research Publishing, 2021. Scirp.org [online], 18. TONG, H., 1983. Threshold models in non-linear time series analysis. Lecture notes in statistics, New York [etc.]: Springer-Verlag,. 1983. ISBN 0387909184 19. TONG, H. 1987. Non-linear time series models of regularly sampled data: a review, Proceedings of the 1st World Congress of the Bernoulli Society : Tashkent, Ussr, 1986. VNU Science Press, Utrecht, NL, pp. 355-367. ISBN 9789067641036. 20. TONG, H. and LIM, K. S., 1980, Threshold Autoregression, Limit Cycles and Cyclical Data. Journal of the Royal Statistical Society: Series B (Methodological). 1980. Vol. 42, no. 3, p. 245-268. DOI 10.1111/j.2517-6161.1980.tb01126.x. Wiley . 44 21. TANSARLI, GIANNOULA S., PAPAPARASKEVAS, JOSEPH, BALASKA, MINA, SAMARKOS, MICHAEL, PANTAZATOU, ANGELIKI, MARKOGIANNAKIS, ANTONIOS, MANTZOURANI, MARINA, POLONYFI, KATERINA and DAIKOS, GEORGE L., 2018, Colistin resistance in carbapenemase-producing Klebsiella pneumoniae bloodstream isolates: Evolution over 15 years and temporal association with colistin use by time series analysis. International Journal of Antimicrobial Agents. 2018. Vol. 52, no. 3, p. 397-403. DOI 10.1016/j.ijantimicag.2018.06.012. Elsevier BV 22. VANEGAS, JAIRO and VÁSQUEZ, FABIÁN, 2017, Multivariate Adaptative Regression Splines (MARS), una alternativa para el análisis de series de tiempo. Gaceta Sanitaria. 2017. Vol. 31, no. 3, p. 235-237. DOI 10.1016/j.gaceta.2016.10.003. Elsevier BV. 23. ., J.-M. and HOWELL, TONG, 1992, Non Linear Time Series. A Dynamical System Approach. Population (French Edition). 1992. Vol. 47, no. 5, p. 1320. DOI 10.2307/1533949. JSTOR 24. ZENG S, Xu Z, WANG X, Liu W, QIAN L, Chen X, Wei J, ZHU M, GONG Z, YAN Y. Time series analysis of antibacterial usage and bacterial resistance in China: observations from a tertiary hospital from 2014 to 2018. Infection and drug resistance, ., 2019,12, 2683–2691. https://doi.org/10.2147/IDR.S220183 25. ZHAO, LINLIN, MBACHU, JASPER, LIU, ZHANSHENG and ZHANG, HUIRONG, 2019, Transfer Function Analysis: Modelling Residential Building Costs in New Zealand by Including the Influences of House Price and Work Volume. Buildings. 2019. Vol. 9, no. 6, p. 152. DOI 10.3390/buildings9060152. MDPI AG 26. ZOU, Y. M., MA, Y., LIU, J. H., SHI, J., FAN, T., SHAN, Y. Y., YAO, H. P. and DONG, Y. L., 2014, Trends and correlation of antibacterial usage and bacterial resistance: time series analysis for antibacterial stewardship in a Chinese teaching hospital (2009–2013). European Journal of Clinical Microbiology & Infectious Diseases. 2014. Vol. 34, no. 4, p. 795-803. DOI 10.1007/s10096-014-2293-6. Springer Science and Business Media LLC 45 Appendixes CODE https://drive.google.com/drive/folders/12h3E8Psh965H8VBhqQPiH4ZPqx-IfBv-?usp=sharing Here you can find the R codes that we used to obtain some results mentioned in the paper. We also uploaded the datasets which was used. 46 APPENDIX A: Figure 15: Mean-Variance plots of 1 differencing and 2 differencing of the density of Klebsiella pneumonia incidence 47 APPENDIX B: Figure 16:ACF and PACF of 1 and 2 differenciated series of the density of Klebsiella pneumonia incidence