Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 384
Fernando Avatar asked Feb 04 '26 22:02

Fernando


1 Answers

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

like image 95
user3084006 Avatar answered Feb 06 '26 13:02

user3084006



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!