Solved – time series decomposition/dtrending using splines

forecastingrsplinestime series

Is there a way/method/approach to decompose a time series data using regression splines:

  1. Seasonal time series into trend+seasonal+random component ?
  2. A non seasonal time series into trend+random component ?

I'm familiar with STL, Census and classical decomposition in R. All these techniques require time series data with seasonal component. We cannot extract trend if the time series is non seasonal (i.e., Frequency = 1).

I recently came across this interesting article which is data driven in the recent 2013 ISF. Any insights on methods like these that are data driven decomposition using regression splines and that can be readily programmed in software packages such R would be greatly helpful.

Thanks so much

Detrending time series with cycle and seasonal components
Tatyana Krivobokova and Francisco Rosales
In this work we discuss a nonparametric and completely data-driven approach to the decomposition of time series into a trend (cycle), seasonal and random components. Two former are modeled with penalized splines, while the latter is assumed to follow an ARMA structure. Empirical Bayesian approach allows to estimate both smoothing parameters and the orders of the ARMA process simultaneously resulting in an efficient, fast and data-driven decomposition procedure. The practical relevance of the approach is illustrated by real-data examples. The work is the extension of Kauermann, G., Krivobokova, T., Semmler, W. (2011) Filtering time series with penalized splines. Studies in Nonlinear Dynamics & Econometrics.

Best Answer

Could you use constrained B-splines from the R library cobs?

co <- cobs(x, y, lambda=-1)