# Time series analysis via generalized additive models: model assumptions and stationarity

I have settled on building a generalized additive mixed model using mgcv::gamm, on data and for purposes I have described in more detail here. In a nutshell, I want to explain variations in monthly tourist numbers at two historic sites, depending on predictors such as weather and economic factors (e.g., Consumer Confidence Index), etc. All this, while taking into account the seasonal pattern in visitor numbers, an increasing trend in visitors over the years, and any autoregressive process in the data. Hopefully the choice of gamm() for modelling this scenario is reasonable. (Also, I am not really concerned with forecasts, rather just a good explanatory model.)

After checking out various sources (e.g., Gavin Simpson's blog posts here and here), there seems to be no mention of assessing stationarity before running such a generalized additive mixed model - yet, this appears to be a major point of focus with time series, generally. I am not clear why this is, and whether me just running gamm() directly on my data is fine (with no differencing done beforehand etc). I am assuming yes, but would rather make sure. Thanks!

• Time series regression and GAM's are fundamentally different. The first requires a stationary series by assumption, the second deals with the trend internally with smoothing. – user2974951 Dec 12 '18 at 7:39
• That's what I was thinking too, but then this bit: "we can use just ARMA models in gamm, so nonstationarity isn’t allowed," confused me here. Maybe I'm not understanding correctly what Peter Laurinec means though... – LexConstantine Dec 12 '18 at 10:46

2. a simple, perhaps linear, trend, with strong autocorrelation in the residuals (say a large $$\rho$$ for an AR(1) process).