Solved – optimal choice of smooth.spline parameter

cross-validationoptimizationrsmoothingtime series

I'm analyzing a time series (terms of trades) on which I want to perform a trend estimation by nonparametric methods like the above mentioned. By the way, I'm a total beginner with R and using the help files is already cryptic enough. Using the default settings of R gives me a smoother which simply follows the curve of the original series, although I thought that by using the cross validation method (which is set to default in R) optimal parameters would be used, i.e. which are a perfect trade-off between smoothness and best-fit. By comparison, I set df=8 which was a much nicer curve, however randomly choosing values isn't really scientific. Can you tell me what's the correct procedure here?

http://i.stack.imgur.com/1ANGe.jpg

Best Answer

The optimal tuning parameter ($\texttt{spar}$) in R function $\texttt{smooth.spline()}$ is automatically determined by min GCV by default (with option $\texttt{cv=FALSE}$). The other option (by setting $\texttt{cv=TRUE}$) is the jackknife (i.e., leave-one-out) based PRESS. Recall that GCV is simplified from PRESS by merely replacing the diagonal elements $S_{ii}$ of the smoothing matrix, say, $\mathbf{S}$ with their average $\mbox{tr}(\mathbf{S})/n$. Usually the best tuning parameter choice from PRESS is similar to that from GCV, though GCV is easier to compute.