Time Series

https://www.youtube.com/playlist?list=PLoK4oIB1jeK0LHLbZW3DTT05e4srDYxFq

Time series - any sequence of measurements taken on a response which is variable over time

Objectives of time series: description, explanation, forecasting

High risk of uncertainty but still worth a try

Types of Time series
 * Seasonal - cycles of less than a year
 * Cyclical - cycles of more than a year
 * Stationary - no trend, seasonal or cyclical effect

Time risk components
 * Trends - T
 * Cycles - C
 * Seasonal effects - S
 * Irregular fluctuations - I
 * Stationary

Forecasting error
 * et = xt - Ft
 * et = error
 * xt = forecast
 * Ft = actual value
 * MAD =sigma( IeiI)/number of forecasts
 * MSE = sigma(ei^2)/number of forecasts

Smoothing

http://www.itl.nist.gov/div898/handbook/pmc/section4/pmc43.htm

Time series basic model~> Y = TCSI or Y = T+C+S+I

Deseasonalising Autocorrelation
 * Aim is to identify the TC to isolate SI.
 * Then we remove the I by dividing it by I.
 * 1st method
 * calculate 4-quarter moving average, calculate 2-year(8-quarters) moving average, divide 2 year moving average by 8, divide original data by moving average to isolate SI, arrange by quarter and year to find median(or eliminate extreme values) which is the seasonal index, devide the SI by the seasonal index I to find the final data.
 * 2nd method
 * calculate 5-point moving average, divide data by these centered moving averages(CMA), avrage the seasonal effects, deseasonalise by dividing data by seasonal effects
 * When data values collected now are correlated with data values collected before in previous time periods
 * Consequences of autocorrelation: tests on coefficients appear more significant than they are, prediction error, high R^2
 * Use Durbin-Watson to calculate Autocorrelation
 * Durbin-Watson less than 1.2 is bad for small sample size
 * Durbin-Watson less than 1.5 is bad for large sample size
 * Autocorrelation above 0.7 is problematic.

Exponential Holt's Method
 * Used for when there is no trend or seasonality
 * https://www.otexts.org/fpp/7/2
 * Smooth for level and trend

Holt-Winters Method
 * https://www.otexts.org/fpp/7/5
 * Adds one more smoothing to the Holt method
 * Smooth for level, trend and seasonality