Skip to main content
added 11 characters in body
Source Link
Nick Cox
  • 59.5k
  • 8
  • 136
  • 212

Loess decomposition is intended to smooth the series by applying averages to the data so that it collapses into components, e.g. the trend or seasonal, that are interesting for the analysis of the data. But this methologymethodology is not intended to do a formal test for the presence of seasonality.

DespiteAlthough in your example stl returns a smoothed pattern of seasonal periodicity, this pattern is not relevant to explain the dynamics of the series. In order to see itthat, we can compare the variance of each component with respect to the variance of the original series.

set.seed(123)
x <- ts(rnorm(144, sd=1), frequency=12)
a <- stl(x, s.window="periodic")
apply(a$time.series, 2, var) / var(x)
#   seasonal      trend  remainder 
# 0.07080362 0.07487838 0.81647852 

We can see that it is the remaiderremainder what explains most of the variance in the data (as we couldwould expect for a white noise process).

If we take a series with seasonality, the relative variance of the seasonal component is much more relevant (although we don't have a straightforward way to test it since Loessloess is not parametric).

y <- diff(log(AirPassengers))
b <- stl(y, s.window="periodic")
apply(b$time.series, 2, var) / var(y)
#    seasonal       trend   remainder 
# 0.875463620 0.001959407 0.117832537 

The relative variances indicate that seasonality is the main component explaining the dynamics of the series.


A careless look at the plot from stl can be deceptive. The nice pattern returned by stl may make us think that a relevant seasonal pattern can be identified in the data, but a closer look may reveal that it's not actually the case. If the purpose is to decide on the presence of seasonality, Loessloess decomposition can be useful as a preliminary view but it should be complemented with other tools.

Loess decomposition is intended to smooth the series by applying averages to the data so that it collapses into components, e.g. the trend or seasonal, that are interesting for the analysis of the data. But this methology is not intended to do a formal test for the presence of seasonality.

Despite in your example stl returns a smoothed pattern of seasonal periodicity, this pattern is not relevant to explain the dynamics of the series. In order to see it, we can compare the variance of each component with respect to the variance of the original series.

set.seed(123)
x <- ts(rnorm(144, sd=1), frequency=12)
a <- stl(x, s.window="periodic")
apply(a$time.series, 2, var) / var(x)
#   seasonal      trend  remainder 
# 0.07080362 0.07487838 0.81647852 

We can see that it is the remaider what explains most of the variance in the data (as we could expect for a white noise process).

If we take a series with seasonality, the relative variance of the seasonal component is much relevant (although we don't have a straightforward way to test it since Loess is not parametric).

y <- diff(log(AirPassengers))
b <- stl(y, s.window="periodic")
apply(b$time.series, 2, var) / var(y)
#    seasonal       trend   remainder 
# 0.875463620 0.001959407 0.117832537 

The relative variances indicate that seasonality is the main component explaining the dynamics of the series.


A careless look at the plot from stl can be deceptive. The nice pattern returned by stl may make us think that a relevant seasonal pattern can be identified in the data, but a closer look may reveal that it's not actually the case. If the purpose is to decide on the presence of seasonality, Loess decomposition can be useful as a preliminary view but it should be complemented with other tools.

Loess decomposition is intended to smooth the series by applying averages to the data so that it collapses into components, e.g. the trend or seasonal, that are interesting for the analysis of the data. But this methodology is not intended to do a formal test for the presence of seasonality.

Although in your example stl returns a smoothed pattern of seasonal periodicity, this pattern is not relevant to explain the dynamics of the series. In order to see that, we can compare the variance of each component with respect to the variance of the original series.

set.seed(123)
x <- ts(rnorm(144, sd=1), frequency=12)
a <- stl(x, s.window="periodic")
apply(a$time.series, 2, var) / var(x)
#   seasonal      trend  remainder 
# 0.07080362 0.07487838 0.81647852 

We can see that it is the remainder what explains most of the variance in the data (as we would expect for a white noise process).

If we take a series with seasonality, the relative variance of the seasonal component is much more relevant (although we don't have a straightforward way to test it since loess is not parametric).

y <- diff(log(AirPassengers))
b <- stl(y, s.window="periodic")
apply(b$time.series, 2, var) / var(y)
#    seasonal       trend   remainder 
# 0.875463620 0.001959407 0.117832537 

The relative variances indicate that seasonality is the main component explaining the dynamics of the series.


A careless look at the plot from stl can be deceptive. The nice pattern returned by stl may make us think that a relevant seasonal pattern can be identified in the data, but a closer look may reveal that it's not actually the case. If the purpose is to decide on the presence of seasonality, loess decomposition can be useful as a preliminary view but it should be complemented with other tools.

added 6 characters in body
Source Link
javlacalle
  • 11.8k
  • 30
  • 56

Loess decomposition is intended to smooth the series by applying averages to the data so that it collapses into components, e.g. the trend or seasonal, that are interesting for the analysis of the data. But this methology is not intended to do a formal test for the presence of seasonality.

Despite in your example stl returns a smoothed pattern of seasonal periodicity, this pattern is not relevant to explain the dynamics of the series. In order to see it, we can compare the variance of each componentecomponent with respect to the variance of the original series.

set.seed(123)
x <- ts(rnorm(144, sd=1), frequency=12)
a <- stl(x, s.window="periodic")
apply(a$time.series, 2, var) / var(x)
#   seasonal      trend  remainder 
# 0.07080362 0.07487838 0.81647852 

We can see that it is the remaider what explains most of the variance in the data (as we could expect for a white noise process).

If we take a series with seasonality, the relative variance of the seasonal component relative to the variance of the series is much relevant (although we don't have a straightforward way to test it since Loess is a not parametric).

y <- diff(log(AirPassengers))
b <- stl(y, s.window="periodic")
apply(b$time.series, 2, var) / var(y)
#    seasonal       trend   remainder 
# 0.875463620 0.001959407 0.117832537 

The relative variances indicate that seasonality is the main component explaining the dynamics of the series.


A careless look at the plot from stl can be deceptive. The nice pattern returned by stl may make us think that a relevant seasonal pattern can be identified in the data, but a closer look may reveal that it's nonot actually the case. If the purpose is to decide on the presence of seasonality, Loess decomposition can be useful as a preliminary view but it should be complemented bywith other tools.

Loess decomposition is intended to smooth the series by applying averages to the data so that it collapses into components, e.g. the trend or seasonal, that are interesting for the analysis of the data. But this methology is not intended to do a formal test for the presence of seasonality.

Despite in your example stl returns a smoothed pattern of seasonal periodicity, this pattern is not relevant to explain the dynamics of the series. In order to see it, compare the variance of each componente with respect to the variance of the original series.

set.seed(123)
x <- ts(rnorm(144, sd=1), frequency=12)
a <- stl(x, s.window="periodic")
apply(a$time.series, 2, var) / var(x)
#   seasonal      trend  remainder 
# 0.07080362 0.07487838 0.81647852 

We can see that it is the remaider what explains most of the variance in the data (as we could expect for a white noise process).

If we take a series with seasonality, the variance of the seasonal component relative to the variance of the series is much relevant (although we don't have a straightforward way to test it since Loess is a not parametric).

y <- diff(log(AirPassengers))
b <- stl(y, s.window="periodic")
apply(b$time.series, 2, var) / var(y)
#    seasonal       trend   remainder 
# 0.875463620 0.001959407 0.117832537 

The relative variances indicate that seasonality is the main component explaining the dynamics of the series.


A careless look at the plot from stl can be deceptive. The nice pattern returned by stl may make us think that a relevant seasonal pattern can be identified in the data, but a closer look may reveal that it's no actually the case. If the purpose is to decide on the presence of seasonality, Loess decomposition can be useful as a preliminary view but it should be complemented by other tools.

Loess decomposition is intended to smooth the series by applying averages to the data so that it collapses into components, e.g. the trend or seasonal, that are interesting for the analysis of the data. But this methology is not intended to do a formal test for the presence of seasonality.

Despite in your example stl returns a smoothed pattern of seasonal periodicity, this pattern is not relevant to explain the dynamics of the series. In order to see it, we can compare the variance of each component with respect to the variance of the original series.

set.seed(123)
x <- ts(rnorm(144, sd=1), frequency=12)
a <- stl(x, s.window="periodic")
apply(a$time.series, 2, var) / var(x)
#   seasonal      trend  remainder 
# 0.07080362 0.07487838 0.81647852 

We can see that it is the remaider what explains most of the variance in the data (as we could expect for a white noise process).

If we take a series with seasonality, the relative variance of the seasonal component is much relevant (although we don't have a straightforward way to test it since Loess is not parametric).

y <- diff(log(AirPassengers))
b <- stl(y, s.window="periodic")
apply(b$time.series, 2, var) / var(y)
#    seasonal       trend   remainder 
# 0.875463620 0.001959407 0.117832537 

The relative variances indicate that seasonality is the main component explaining the dynamics of the series.


A careless look at the plot from stl can be deceptive. The nice pattern returned by stl may make us think that a relevant seasonal pattern can be identified in the data, but a closer look may reveal that it's not actually the case. If the purpose is to decide on the presence of seasonality, Loess decomposition can be useful as a preliminary view but it should be complemented with other tools.

Source Link
javlacalle
  • 11.8k
  • 30
  • 56

Loess decomposition is intended to smooth the series by applying averages to the data so that it collapses into components, e.g. the trend or seasonal, that are interesting for the analysis of the data. But this methology is not intended to do a formal test for the presence of seasonality.

Despite in your example stl returns a smoothed pattern of seasonal periodicity, this pattern is not relevant to explain the dynamics of the series. In order to see it, compare the variance of each componente with respect to the variance of the original series.

set.seed(123)
x <- ts(rnorm(144, sd=1), frequency=12)
a <- stl(x, s.window="periodic")
apply(a$time.series, 2, var) / var(x)
#   seasonal      trend  remainder 
# 0.07080362 0.07487838 0.81647852 

We can see that it is the remaider what explains most of the variance in the data (as we could expect for a white noise process).

If we take a series with seasonality, the variance of the seasonal component relative to the variance of the series is much relevant (although we don't have a straightforward way to test it since Loess is a not parametric).

y <- diff(log(AirPassengers))
b <- stl(y, s.window="periodic")
apply(b$time.series, 2, var) / var(y)
#    seasonal       trend   remainder 
# 0.875463620 0.001959407 0.117832537 

The relative variances indicate that seasonality is the main component explaining the dynamics of the series.


A careless look at the plot from stl can be deceptive. The nice pattern returned by stl may make us think that a relevant seasonal pattern can be identified in the data, but a closer look may reveal that it's no actually the case. If the purpose is to decide on the presence of seasonality, Loess decomposition can be useful as a preliminary view but it should be complemented by other tools.