Time Series Pt. 2 Flashcards
How to check for stationarity?
- Create a line plot and visually check for stationarity
- Check the statistics – does the mean move through time?
- Do a Dickey-Fuller Test
- P > 0: Not Stationary
- P < 0: Stationary
How to check for seasonality?
- Create a line plot
- Understanding the nature of the data and what would be expected
- Look at an autocorrelation plot
- There should be a sinusoidal shape to the correlations if there is seasonality
- Can look at the length of each season by looking at the plots (lag length of each season)
How to adjust for seasonality?
- Add a seasonal component to linear trend in time model with a categorical variable
- Use differencing to transform our data, which helps our data become stationary but removes seasonal component
How to check for serial correlation?
- Create a line plot – visually check for points in time reliant on each other, including seasonality
- Understand nature of the data and what would be expected
- Look at an autocorrelation plot also known as a correlogram or an autocorrelation function (ACF) plot
Correlogram
Plots the autocorrelation for sequential lags allowing us to see the structure of the correlation in each lag
What its the autocorrelation in the plots if the correlation in the lags are random?
Near zero
What its the autocorrelation in the plots if the correlation in the lags are not random?
Significantly non-zero
Trend component – linear models
Important for long-term forecasts and we fit trend models to time series, particularly when we have deterministic trends.
Trend component – MA models
MA maps the average of the prior data points, given a certain specified lag. The longer the lag the smoother our MA line. The shorter the lag the wigglier our MA line, making it closer to the original data.
What do MA models identify?
MA models are simple but a good starting place in trying to explain the signal underlying our time series data. They are also helpful in identifying “shocks” and/or seasonality in the historical data.
What do MA models help inform?
Helps inform trend selection and identify abnormal behaviors
Trend Component - Exponential Smoothing
Calculates weighted average of past data points, while assuming the weights on those past observations are exponentially decreasing. Longer the lag from your current point, the less weight is given, assuming exponential behavior.
Simple Exponential Smoothing
Use on time series data with no underlying trend or seasonality. It has one parameter, which controls how long we want to trust the historical points further and further away from the current point.
In simple exponential smoothing, what does an alpha near 1 mean?
The most recent data influence our forecast
In simple exponential smoothing, what does an alpha near 0 mean?
Older and older data influence our forecast