smoothls: 'smoothls' smoothes a time series by Whittaker graduation....

Description Usage Arguments Value Examples

View source: R/decomp.r

Description

smoothls smoothes a time series by Whittaker graduation. The function depends on the package Matrix.

Usage

1
smoothls(y, beta = 0)

Arguments

y

the series, a vector or a time series

beta

smoothing parameter >=0 (the larger beta is, the smoother will g be)

Value

g vector, smooth component

Examples

1
2
3
4
5
6
 
data(GDP)
g <- smoothls(GDP,12)

 plot(GDP)   
 t <- seq(from = tsp(GDP)[1], to = tsp(GDP)[2],by=1/tsp(GDP)[3]) ; lines(t,g,col="red")  

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

Related to smoothls in tsapp...