Default model used in stlm() function in R

2.9k Views Asked by At

When forecasting of a seasonal time series is done using stlm() or stlf() in R and no model is specified, what is the default model used? Ps- I read the documentation and searched on the internet but couldn't find any lead.

2

There are 2 best solutions below

0
On BEST ANSWER

From the help file:

stlm takes a time series y, applies an STL decomposition, and models the seasonally adjusted data using the model passed as modelfunction or specified using method. It returns an object that includes the original STL decomposition and a time series model fitted to the seasonally adjusted data. This object can be passed to the forecast.stlm for forecasting.

If you look at the default arguments, modelfunction=NULL and method="ets". So it uses an ETS model on the seasonally-adjusted data.

0
On

IN NOT SPECIFIED ANY METHOD OR Model name, like below codes, what method is used here for forecasting a time series decomposed by mstl method in R: ,,,, stlm_model <-msts_train %>% stlm(lambda = 0) %>% forecast(h=48) plot(stlm_model,xlim) = c(230,240))