Main purposes of time series analysis are:
- decomposing and explaining data (trend, seasonal variation)
- forecasting (predicting future events based on historic data)
- clustering and classification of data
Common data characteristics
There are some common assumptions of time series data.
Stationarity
- the mean of series is a constant.
- the variance of the series does not change over time
- the covariance does not change over time.
Shortly, stationarity means that mean, variance and covariance of data do not change over time.
Time Series Data Decomposition
Time series decomposition is a method to split data series into components. In this technique, time series data is decomposed into trend, seasonal, cyclic, and irregular (noise) components.
- Trend component reflects the overall direction in data.
- Seasonal component is a variation that occurs at specific regular intervals in data series (e.g., weekly, monthly).
- Cyclic component describes repeated but non-periodic fluctuations in data.
- Irregular (noise) component is residuals, a remaining of after removing above components from data series.
# 1000 random element between 100 and 500
> value=sample(100:500,1000, replace = T)
# ts class usage, 24 observations per day
> value_ts=ts(value,frequency = 24)
# decompose value_ts
> decomp_value=decompose(value_ts) > plot(decomp_value)
The chart shows observed (original data), trend, seasonal, random (residuals) parts of time series data. The
forecast::stl() function is
also can be used to decompose. Please refer below my post for practical example.
No comments:
Post a Comment