smoothrb
smoothes a time series robustly by using Huber's psi-function. The initialisation uses a moving median.
smoothrb
smoothes a time series robustly by using Huber's psi-function. The initialisation uses a moving median.smoothrb(y, beta = 0, q = NA)
y
: the series, a vector or a time seriesbeta
: 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 valuesg vector, the smooth component
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")
Useful links