smoothrb function

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)

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

Returns

g vector, the smooth component

Examples

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")
  • Maintainer: Rainer Schlittgen
  • License: GPL
  • Last published: 2021-10-30

Useful links