# Time series analysis to quantify trend when seasonal amplitude is decreasing

Short version: How would one be able to quantify an intervention effect in time-series analysis when the intervention decreases seasonal amplitude variation but doesn't directly effect the median?

Here is a link to my raw data.

I have a complex time-series of daily incidence numbers for a population over 7 years, totaling 2557 observations. There is a strong weekly and yearly seasonality (high incidence in winter months and low incidence in summer months). There is a baseline negative trend which is orders of magnitude smaller than the seasonality. An intervention was introduced at time = 1700. This intervention should theoretically not cause a level shift. My aim is to detect whether the intervention increases the baseline negative trend.

I have attempted to fit a dynamic linear regression with ARIMA errors in R using auto.arima() in the forecast package. I modeled the weekly season using a dummy variable for each weekday and the weekend. I modeled the monthly seasonality with harmonics using fourier() function in the forecast package. An the intervention effect was coded in by specifying the time index and post-intervention times as independent variables using the methods described in Segmented regression analysis of interrupted time series studies in medication use research. With these variables specified auto.arima() suggests an ARMA(7,7) process. The coefficients for baseline trend and post-intervention trend are however non-significant.

I am concerned that by using fourier terms to model away the seasonality I am artificially removing any intervention effect, as visual analysis of the time series indicates that the intervention is specifically decreasing incidence during the winter months and therefore reducing the yearly seasonal variability.

• Sounds like a job for a complicated but thorough approaches to time series analysis. Why don't you post your data as it sounds like a challenge to AUTOBOX ( a piece of software that I have helped to develop). Successful data challenges to heretofore superior approaches often yield improvements in the heuristics (approaches) to thorny problems as they can often suggest chinks in the armor that need to be retrofitted. Dec 14 '15 at 19:26
• @IrishStat I have added a link to my raw data. It is in the form of a .csv file. Please let me know it that is optimal. I am as interested in understanding how and why a certain model will minimize these risks as I am in the end result. I would like to take the opportunity and thank you for the extensive library of quality answers you have provided on Cross Validated in the field of forecasting and time series analysis. As a newcomer to the field I can truly say that your answers have provided a large portion of my current, albeit, rudimentary knowledge. Dec 14 '15 at 19:59
• I sincerely appreciate your kind reflections .. They are a great reward to me . Dec 14 '15 at 23:22
• please specify the starting date .... and also confirm that there are no missing values or days that are omitted due to non-reporting or whatever .. Dec 14 '15 at 23:26
• @IrishStat All days starting on the 1st of January 2008 are reported. There are no missing values or omissions. There is also no negatives or zeros in the data. The intervention in this specific analysis occurs on observation 1700. Dec 14 '15 at 23:46