[R] STL - time series seasonal decomposition sensitive to data points?

Jeff Newmiller jdnewmil at dcn.davis.ca.us
Wed Jul 19 21:03:30 CEST 2017

I think this looks like a question about statistics. I suggest you review the documentation for the functions you are using and study the references to better understand the algorithms you are using. If you think the algorithms are not behaving according to theory and the packages are part of the base R software distribution, then you should come back here with a reproducible example. [1][2][3]

If you think the algorithms are misbehaving and packages you are using are contributed then you should probably correspond with the package maintainer. 

But most likely you just need to ask your statistics question in a statistics forum rather this R language forum. 

[1] http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example

[2] http://adv-r.had.co.nz/Reproducibility.html

[3] https://cran.r-project.org/web/packages/reprex/index.html (read the vignette)
Sent from my phone. Please excuse my brevity.

On July 19, 2017 11:34:38 AM PDT, Eridk Poliruyt <ep19772 at gmail.com> wrote:
>Hi all,
>I am trying to analyse a time series data and want to make
>trend-season decomposition using STL approach in R. However I found
>the decomposition result seems to be sensitive to data points even
>with the robust option.
>More specifically, suppose I have a few years of monthly data. Using
>stl, I got a decomposition T1 + S1 + R1. Then I deleted the most
>recent two or three data points, the resulted decomposition T2 + S2 +
>R2 are totally different from the one with full data, especially for
>the beginning of time series which is weird. I would have expected
>that wouldn't be changed much due to the local nature of STL.
>May I ask for any thoughts and help on this issue? Many thanks!
>Best regards,
>R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>PLEASE do read the posting guide
>and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list