Fernando
Fernando

Reputation: 7895

TIme series decomposition using R

I'm using R with the forecast package to build some time-series models. Right now, i'm dealing with multiple-seasonality data, using the tbats function.

When a plot the fitted-model, i get a plot with the time-series components. My question is, what does exactly the slope component means? (I couldn't find it in the docs).

Code:

fit <- tbats(co2, use.trend= TRUE, use.box.cox = TRUE, seasonal.periods = c(12))
plot(fit)

Thanks!enter image description here

Upvotes: 3

Views: 3055

Answers (1)

user3084006
user3084006

Reputation: 5564

The slope m indicates the trend. You probably want to use the stl or decompose functions in R to derive the slope and season.

The general equation for decomposition is x(t)=s(t)+m(t)+e(t) where t is time, m is slope or trend, s is season and e is the error term for residuals.

Seasonality is the periodic fluctuations and trend is a generalized direction over a given time

Upvotes: 3

Related Questions