Time series - basic idea
Time series (or longitudinal) data is data on one observation unit measured at successive points in time
A time series is a time-ordered set of values of a variable Y
Time series analysis is used for the description and explanation of the temporal changes of a variable.
Time series decomposition:
Modeling basics
• Y = variable to model
• T = trend component
• S = seasonal/cyclical component
• R = residual (noise) component
Additive vs Multiplicative model
Simple time series model
Simple time series model – autocorrelation
We can estimate the unknown parameter with a linear regression model (OLS)
Time t is included as an independent variable in the model
The quality of the estimated regression model is then assessed by the known quality measures (R2, F statistics, p-value etc.)
-> NEW: Autocorrelation of successive error terms might be a problem!, can be idetntifies by the Durbin-Watson statistic
Durbin-Watson
Problem of autocorrelation → Standard errors might be
under/overestimated
High autocorrelation signals that model is missing important structure (e.g., lag terms, seasonality, trend)
The expected value of d is for large value of T…
… 0 for perfect positive correlation.
… 2 for complete uncorrelated error terms.
… 4 for perfect negative correlation.
Point estimation:
After we have estimated the model, we can use it to forecast future values
The confidence of the forecast depends (of course) on how well the model fits the data
Point estimation + Seasonal Component:
Interval estimation:
After we have estimated the model, we can use it to forecast future values.
• The confidence of the forecast depends (of course) on how well the model fits the data
structural breaks 1
Further models
Structural breaks can be accounted for by dummy variables. The dummy variables equal zero before the structural break. After the structural break, their value is one
example: chanegs in tax law
structural breaks 2
Problems of asimple model
In reality, time series are often messy and show statistical properties (mean, variance,nautocorrelation) that change over time. These time series are more difficult to model and predict.
Stationarity
property of a time series where statistical characteristics (mean, variance, autocorrelation) do not change over time -> steady behavior, no trends, seasonal effects or other time varying featurres
weak (or second-order) stationarity
constant mean
constant variance
constant autocorrelation
How do you describe this time series?
startionary
nonconstant variance
seasonal component
nonconstant variance adn seasonal component
nonconstant mean and seasonal component
nonconstant variance and mean and seasonal component
How to test for stationarity?
descriptive tests
statistical tests (Augmente Dickey Fuller test - ADF test)
Descriptive tests
plot time series and look for patterns
split time series into different parts and compare summary statistics (mean, var, autocorrelation) if they are different the time sereis might not be stationary
Statistical tests
Augmented Dickey Fuller test - ADF test)
H0: the time series possesses a unit root (i.e., is non-stationary)
If the p-value of the ADF test is below the significance level (𝛼 = 0.05) we can reject H0 and assume the time series is stationary
Why do we want a stationary time series?
forecasting is easier -> fc more reliable
lots of fc models assume at least weak (or second-order) stationarity
autoregressive forecasting models struggle with non-stationary time series, use lags in linear regression tp predict future
stationary time series ensures that the predictors are nearly independent
Strategies to make a time series stationary:
differencing the time series (can be done multiple times)
log transformation
Taking the n-th root of the time series
combination of all strategies
convert to dummies
Last changed12 days ago