splinedecomp: 'splinedecomp' decomposes a time series into trend, season...

Description Usage Arguments Value Examples

View source: R/decomp.r

Description

splinedecomp decomposes a time series into trend, season and irregular component by spline approach.

Usage

1
splinedecomp(x, d, alpha, beta, Plot = FALSE)

Arguments

x

the series, a vector or a time series

d

seasonal period

alpha

smoothing parameter for trend component (The larger alpha is, the smoother will the smooth component g be.)

beta

smoothing parameter for 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  <- splinedecomp(GDP,4,2,4,Plot=FALSE) 

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

Related to splinedecomp in tsapp...