smoothrb {tsapp} | R Documentation |
smoothrb
smoothes a time series robustly by using Huber's psi-function.
The initialisation uses a moving median.
Description
smoothrb
smoothes a time series robustly by using Huber's psi-function.
The initialisation uses a moving median.
Usage
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
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")
[Package tsapp version 1.0.4 Index]