Skip to Content
RStudio for R Statistical Computing Cookbook
book

RStudio for R Statistical Computing Cookbook

by Andrea Cirillo
April 2016
Beginner to intermediate content levelBeginner to intermediate
246 pages
5h 20m
English
Packt Publishing
Content preview from RStudio for R Statistical Computing Cookbook

Performing time series decomposition using the stl() function

Nearly every phenomenon can be represented as a time series.

It is therefore not surprising that time series analysis is one of most popular topics within data-science communities.

As is often the case, R provides a great tool for time-series decomposition, starting with the stl() function provided within base R itself. This function will be the base of our recipe.

Getting ready

This recipe will mainly use the stl() function, which implements the Loess() method for time-series decomposition.

Using this method, we are able to separate a time series into three different parts:

  • Trend component: This highlights the core trend of the phenomenon if perturbations and external influence were not ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Practical Data Analysis Using Jupyter Notebook

Practical Data Analysis Using Jupyter Notebook

Marc Wintjen

Publisher Resources

ISBN: 9781784391034Supplemental Content