Definition: A repeating pattern at fixed intervals in a time series.
Common Examples:
We look for periodic cycles, indicating seasonality.
To separate trend, seasonality, and random noise.
Helps diagnose whether differencing or transformation is required.
Facilitates clearer insights into the underlying structure of the data:
Trend: Long-term progression or decline in data.
Seasonality: Regularly repeating fluctuations at fixed intervals.
Noise: Random fluctuations around the trend and seasonal components.
Enhance model selection accuracy by clarifying:
It improves forecasting accuracy by clearly identifying and modeling individual components separately.
Autoregressive Integrated Moving Average (ARIMA) models non-seasonal time series.
Seasonal ARIMA (SARIMA) extends ARIMA by incorporating:
Series: ts_data
ARIMA(0,0,0)(0,1,2)[12]
Coefficients:
sma1 sma2
-1.0450 0.1803
s.e. 0.1534 0.1146
sigma^2 = 0.8684: log likelihood = -154.03
AIC=314.07 AICc=314.3 BIC=322.11
Training set error measures:
ME RMSE MAE MPE MAPE MASE
Training set -0.0389954 0.8758172 0.6589655 -0.300084 3.419388 0.5895063
ACF1
Training set 0.04151066
auto.arima() selects optimal parameters.
Challenges:
Example: Predicting attendance at football matches using past attendance data.
Interpretation: Seasonality clearly reflected in predictions.
Sports Example: Predicting monthly goal-scoring rates for a football team.
Ljung-Box test
data: Residuals from ARIMA(0,0,0)(0,1,2)[12]
Q* = 19.484, df = 22, p-value = 0.6153
Model df: 2. Total lags used: 24
checkresiduals).Examples:
Hausman Test
data: response ~ year
chisq = 5.6566e-15, df = 4, p-value = 1
alternative hypothesis: one model is inconsistent