msdecompose: Multiple seasonal classical decomposition

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/msdecompose.R

Description

Function decomposes multiple seasonal time series into components using the principles of classical decomposition.

Usage

1
msdecompose(y, lags = c(12), type = c("additive", "multiplicative"))

Arguments

y

Vector or ts object, containing data needed to be smoothed.

lags

Vector of lags, corresponding to the frequencies in the data.

type

The type of decomposition. If "multiplicative" is selected, then the logarithm of data is taken prior to the decomposition.

Details

The function applies centred moving averages based on filter function and order specified in lags variable in order to smooth the original series and obtain level, trend and seasonal components of the series.

Value

The object of the class "msdecompose" is return, containing:

Author(s)

Ivan Svetunkov, ivan@svetunkov.ru

See Also

filter

Examples

1
2
3
4
5
6
# Decomposition of multiple frequency data
## Not run: ourModel <- msdecompose(forecast::taylor, lags=c(48,336), type="m")
ourModel <- msdecompose(AirPassengers, lags=c(12), type="m")

plot(ourModel)
plot(forecast(ourModel, model="AAN", h=12))

config-i1/smooth documentation built on June 16, 2021, 2:13 p.m.