simpledecomp: 'simpledecomp' decomposes a vector into trend, season and...

Description Usage Arguments Value Examples

View source: R/decomp.r

Description

simpledecomp decomposes a vector into trend, season and irregular component by linear regression approach

Usage

1
simpledecomp(y, trend = 0, season = 0, Plot = FALSE)

Arguments

y

the series, a vector or a time series

trend

order of trend polynomial

season

period of seasonal component

Plot

logical, should a plot be produced?

Value

out: (n,3) matrix

1. column

smooth component

2. column

seasonal component

3. column

irregular component

Examples

1
2
data(GDP)
out  <- simpledecomp(GDP,trend=3,season=4,Plot=FALSE) 

tsapp documentation built on Oct. 30, 2021, 5:08 p.m.

Related to simpledecomp in tsapp...