Trend spotting!

Time Series Analysis in R

David S. Matteson

Associate Professor at Cornell University

Trends

Some time series do not exhibit any clear trends over time:

Time Series Analysis in R

Trends: linear

Examples of linear trends over time:

Time Series Analysis in R

Trends: rapid growth

Examples of rapid growth trends over time:

Time Series Analysis in R

Trends: periodic

Examples of periodic or sinusoidal trends over time:

Time Series Analysis in R

Trends: variance

Examples of increasing variance trends over time:

Time Series Analysis in R

Sample transformations: log()

The log() function can linearize a rapid growth trend:

Time Series Analysis in R

Sample transformations: diff()

The diff() function can remove a linear trend:

Time Series Analysis in R

Sample transformations: diff(…, s)

The diff(…, s) function, or seasonal difference transformation, can remove periodic trends.

diff(x, s = 4)

Time Series Analysis in R

Let's practice!

Time Series Analysis in R

Preparing Video For Download...