Time Series Analysis in R
David S. Matteson
Associate Professor at Cornell University
Some time series do not exhibit any clear trends over time:
Examples of linear trends over time:
Examples of rapid growth trends over time:
Examples of periodic or sinusoidal trends over time:
Examples of increasing variance trends over time:
The log()
function can linearize a rapid growth trend:
The diff()
function can remove a linear trend:
The diff(…, s)
function, or seasonal difference transformation, can remove periodic trends.
diff(x, s = 4)
Time Series Analysis in R