powered by
splinedecomp
splinedecomp decomposes a time series into trend, season and irregular component by spline approach.
splinedecomp(x, d, alpha, beta, Plot = FALSE)
the series, a vector or a time series
seasonal period
smoothing parameter for trend component (The larger alpha is, the smoother will the smooth component g be.)
smoothing parameter for seasonal component
logical, should a plot be produced?
out (n,3) matrix:
smooth component
seasonal component
irregular component
# NOT RUN { data(GDP) out <- splinedecomp(GDP,4,2,4,Plot=FALSE) # }
Run the code above in your browser using DataLab