smoothrb: 'smoothrb' smoothes a time series robustly by using Huber's...

Description Usage Arguments Value Examples

View source: R/decomp.r

Description

smoothrb smoothes a time series robustly by using Huber's psi-function. The initialisation uses a moving median.

Usage

1
smoothrb(y, beta = 0, q = NA)

Arguments

y

the series, a vector or a time series

beta

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

q

length of running median which is used to get initial values

Value

g vector, the smooth component

Examples

1
2
3
4
data(GDP)
g  <- smoothrb(GDP,8,q=8)
 
 plot(GDP) ; t <- seq(from = 1970, to = 2009.5,by=0.25) ; lines(t,g,col="red")  

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

Related to smoothrb in tsapp...