# Interpreting range bars in R's plot.stl?

I have trouble figuring out what the range bars in plot.stl exactly mean. I found Gavin's post on this question and read the documentation as well, I understand that they tell the relative magnitude of the decomposed components, but still I am not entirely sure how they work.

E.g.:

data: tiny bar, no scale seasonal: full bar, with scale ranging from -0.6 to 0.2 trend: another tiny bar (seems to be equal to data), no scale remainder: medium sized bar with scale from -1.5 to 0.5

I do not understand what's the basis to relation and why trend has no scale. I tried stl and decompose with identical results for multiplicative and additive methods.

Here is an example to discuss specifics against:

> plot(stl(nottem, "per"))


So on the upper panel, we might consider the bar as 1 unit of variation. The bar on the seasonal panel is only slightly larger than that on the data panel, indicating that the seasonal signal is large relative to the variation in the data. In other words, if we shrunk the seasonal panel such that the box became the same size as that in the data panel, the range of variation on the shrunk seasonal panel would be similar to but slightly smaller than that on the data panel.

Now consider the trend panel; the grey box is now much larger than either of the ones on the data or seasonal panel, indicating the variation attributed to the trend is much smaller than the seasonal component and consequently only a small part of the variation in the data series. The variation attributed to the trend is considerably smaller than the stochastic component (the remainders). As such, we can deduce that these data do not exhibit a trend.

Now look at another example:

> plot(stl(co2, "per"))


which gives

If we look at the relative sizes of the bars on this plot, we note that the trend dominates the data series and consequently the grey bars are of similar size. Of next greatest importance is variation at the seasonal scale, although variation at this scale is a much smaller component of the variation exhibited in the original data. The residuals (remainder) represent only small stochastic fluctuations as the grey bar is very large relative to the other panels.

So the general idea is that if you scaled all the panels such that the grey bars were all the same size, you would be able to determine the relative magnitude of the variations in each of the components and how much of the variation in the original data they contained. But because the plot draws each component on it's own scale, we need the bars to give us a relative scale for comparison.

Does this help any?

• Indeed it does. Thx Gavin, this are just one great explanation and nice examples. I just did not get that the bar in the data panel is the unit bar. Plus I find it a little irritating that you don't have scales for trend. Anyway great help! thx! Mar 4, 2011 at 16:00
• D'oh. I got it. The color of acceptance is really bad for be, because I am colorblind :) It's much better on SO, maybe CV should change it because there a quite a few colorblind people around... ;) Mar 4, 2011 at 16:04
• @ran2 what do you mean by no scales for trend? Do you mean on the axis or no grey bar for trend? If the latter, I suspect that the trend is such a strong/large part of the variation in the data that the grey bar is so small as to be less than 1px in size. Try plotting on a huge pdf() device and see if it shows up? As for the colour of the tick, I'll post something on meta to see if we can change it and point to this accessibility issue. Mar 4, 2011 at 17:04
• no, i just mean the scale on the axis. in my case the trend is not as strong as in your second example, but still strong. But as you example shows: the trend never has a scale no matter if the bar is small or big. It does not really matter here because the relation is important here, but nevertheless i would be interested in the meaning of the scale on the right (repsectively its dimension – if there is any. Or is it just a dimensionless factor?) Mar 4, 2011 at 22:14
• But there is a scale on the trend panels in both my examples?! Mar 5, 2011 at 8:08