Professional Documents
Culture Documents
DIgitizatie Week 11
DIgitizatie Week 11
DIgitizatie Week 11
Descriptive
- Time series analysis
• Trends
• Seasonal patterns
• Relationship to external factors
Predictive
- Forecast future values
• Single TS forecasting
• Multivariate TS forecasting
– Cross-correlation TS’s
Naive forecast
• Naive forecast = last value of TS (green line)
• Seasonal Naive forecast = last similar value (orange line)
• Can be surprisingly difficult to outperform
• Always compare forecast to this baseline
Modeling seasonality
• Values higher/lower depending on season
• Examples: day-of-week, monthly, quarterly
• Integrating in regression model
– Create categorical variable for season
– Make dummies from these variables
– Each dummy is an extra predictor
• Types
– Additive: fixed amount more/less
– Multiplicative: higher/lower by percentage
Monthly additive
- Yt = β0 + C(2)δ(2) + C(3)δ(3) + ... + C(12)δ(12) + ε
Modeling trend & seasonality
- Quadratic trend & monthly additive seasonality
- Yt = β0 + β1t + β2t 2 + C(2)δ(2) + C(3)δ(3) + ... + C(12)δ(12) + ε
Autocorrelation
Smoothing methods
Moving average
- Average values across a window of consecutive periods
• Centered moving average (a)
– MAt = 1 /w (Yt−(w−1)/2 + ... + Yt−1 + Yt + Yt+1 + ... + Yt+(w−1)/2)
– Good for visualizing trends
– Can remove seasonality and noise
• Trailing moving average (b)
– Ft+k = 1/ w (Yt + Yt−1 + ... + Yt−w+1)
– Useful for forecasting
– Not good for TS with trend and/or
seasonality
Choosing window
• Balance between over/under-smoothing
• Centered
– Wider exposes global trends
– Narrower exposes local trends
• Trailing
– Relevance of past values
– How fast does TS change?
– Empirical search, but be careful with overfitting
Choosing α
• Determines rate of learning
– Close to 1: fast learning (recent values have more influence)
– Close to 0: slow learning (past has more influence)
• α = 0.1 − 0.2 leads to good results in general
• Empirical search can be done, but attention to overfitting
Advanced exponential smoothing Trend
• Can capture trend and seasonality
• Trend shape is not assumed to be global and can change over time
• Future forecasts are no longer identical
• α&β : {0, 1}
• Lt : weighted average of actual period and level in previous adjusted by trend
• Tt : weighted average of trend in previous period and recent change of level