Time Series Analysis
This page shows examples on time series decomposition and forecasting with R.
Time Series Decomposition
Time series decomposition is to decompose a time series into trend, seasonal, cyclical and irregular components. A time series of AirPassengers is used below as an example to demonstrate time series decomposition.
In the above figure, the first chart is the original time series, the second is trend, the third shows seasonal factors, and the last chart is the remaining component.
Some other functions for time series decomposition are stl() in package stats, decomp() in package timsac, and tsr() in package ast.
Time Series Forecasting
Time series forecasting is to forecast future events based on known past data. Below is an example for time series forecasting with an autoregressive integrated moving average (ARIMA) model.
More examples on time series analysis and mining with R and other data mining techniques can be found in my book "R and Data Mining: Examples and Case Studies", which is downloadable as a .PDF file at the link.