More help with stl?
Thank you. I am not saying the data is wrong. I can do somethiing like: y = tread + seasonal + remainder and it gives me back the original data almost exactly. I just don't know how to interpret it. The data is clearly not periodic but I was expecting to get more information about the function that was indicated in the seasonal component. Something similar to the impulse response to a function generates values at basically all frequencies but different amplitudes. There is something different in the response to this function than say what would be expected from a Fourier analysis of frequencies. Kevin
---- stephen sefick <ssefick at gmail.com> wrote:
.15+.52 #seasonal (.01*52) I think because you said it was periodic [1] 0.67
.8+.67 #seasonal + trend + positive remainder
[1] 1.47 now if you look at the little bit that is in the remainder being negative then you can probably subtract about .4ish which is close to 1 which is the value of the time series in question, I think. Is this example periodic? Is your data periodic? On Tue, Sep 2, 2008 at 12:21 PM, <rkevinburton at charter.net> wrote:
There was a typo. I wnated to form an array so it should be: y <- numeric(365) Now you should be able to reproduce it. Kevin ---- stephen sefick <ssefick at gmail.com> wrote:
I can't reproduce this because the data has two points 0 and one at the ends of the data set, and I get an na.fail error. There is no periodic part to this data- it doesn't seem because there are only two points. stephen On Tue, Sep 2, 2008 at 11:38 AM, <rkevinburton at charter.net> wrote:
I don't understand the output of stl. As a simple example: y <- numeric(1:365) y[250] = 1 stl <- stl(ts(y, frequency=7), s.window="periodic") This returns without error but the results are puzzling to me. If you plot the results it is probably easiest to visualize what I mean. plot(stl) This shows the original data (a single spike at 250). A trend (which also shows a bump at 250). It is the rest that I have a question on. For the "seasonal" component it seems to show a sinusoid like wave with a period roughly a week (7 days) long all with the same amplitude. I can't see how a single spike can generate a "seasonal" component that is periodic for every period in the data. Finally the "remainder" portion of the data generated seems to show just what I want, a representation of the input. But if this is ruly the remainder (data - (trend + seasonal)) then shouldn't it have all entries close to zero? Please help me with my misunderstanding if you have any experience with stl. Finally it has been suggested that in order to find an overall formula to represent the data a model will need to be constructed. I unfortunately don't have any experience in developing a model. Any hints on where to start? Thank you. Kevin
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
--
Stephen Sefick
Research Scientist
Southeastern Natural Sciences Academy
Let's not spend our time and resources thinking about things that are
so little or so large that all they really do for us is puff us up and
make us feel like gods. We are mammals, and have not exhausted the
annoying little problems of being mammals.
-K. Mullis
-- Stephen Sefick Research Scientist Southeastern Natural Sciences Academy Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us feel like gods. We are mammals, and have not exhausted the annoying little problems of being mammals. -K. Mullis