Discussion on STL decomposition _r in R software

Source: Internet
Author: User

STL decomposition is based on loess, the local weighted regression scatter smoothing method, which was 1990 by the University of Michigan's R. B. Professor Cleveland and W of At&t Bell Laboratory. S. Cleveland a method of decomposing time series. The STL decomposition breaks down the time series into seasonal items, trend items and residues.

In order to study this method, I spent a day poring over this paper, completed 17 pages of translation (original 31 pages, excluding the discussion comment part), basically have a general understanding of the principle of this method. Essentially, this method is based on loess, consisting of internal and external loops. Among them, the inner loop includes 6 steps, such as ① trend, ② periodic subsequence smoothing, ③ low-pass filtering for the smooth periodic subsequence. The main function of the outer loop is to introduce a robust weight term to control the effect of outliers in the data, which will take into consideration the next phase of the loop's proximity weights. In fact, both the trend component and the seasonal component are obtained in the inner loop. After the cycle, seasonal items will appear a certain degree of Burr phenomenon, because in the inner loop is smooth in each of the intercept, therefore, in accordance with the time series after the row, you can not guarantee the smooth adjacent period, for this reason, also need to carry out after the seasonal item smoothing, after smoothing based on local two fit, And there is no need for robust iterations in loess.

R Software and S-plus software all provide STL decomposition function, but there are some slight differences between two software. Specific reference to STL function Help.

The results of STL decomposition of CO2 data in R software are given directly below. The top of the graph is the original CO2 concentration changes over time, from January 1959 ~1997 year December, a total of 468 data. The following are seasonal items, trend items, and residues. From the result, the effect of decomposition is still good. In addition to the decomposition diagram, R gives some statistical characteristics, which can be obtained by summary.

Time.series components:

Seasonal trend Remainder

Min.   : -3.265996e+00 Min.   : 315.1541 Min. :-0.98368572

1st qu.:-1.462496e+00 1st qu.:323.3135 1st qu.:-0. 16954989

median:2.932741e-01 median:335.3495 median:0.01276959

Mean: -2.899070e-09 mean:337.0412 mean:0.01230954

3rd Qu.: 1.614786e+00 3rd qu.:350.6615 3rd Qu.: 0.15367962

Max.   : 3.000911e+00 Max.   : 364.2825 Max. : 1.05926138

IQR:

Stl.seasonal stl.trend Stl.remainder Data

3.0773 27.3481 0.3232 26.7250

% 11.5 102.3 1.2 100.0

Weights:

Min.    1st Qu.      Median Mean 3rd Qu. Max.

0.0000000 0.8331992 0.9452152 0.8708025 0.9870979 0.9999976


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.