Tell me more ×
Cross Validated is a question and answer site for statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.

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

share|improve this question
If you want to actually optimize a smoother, I'd recommend the mgcv package that comes with base R. There is a learning curve, but it generates smoothers that are optimal under a few choices of loss definitions. If you just want a picture that looks good, try a few different bandwidths for loess and call it good. – Shea Parkes Oct 28 '12 at 16:47
I want to compare specific smoothers with each other, one of them are smoothing splines, smooth.spline in R. Isn't there an easy standard method to optimize it? and what is the most comfortable way to analyze the results? Thanks already for your comment, Shea – Alex Oct 29 '12 at 20:14
Compare how? Optimize what? Loess in particular was designed as a visual aid and is "optimal" when it looks best. As for the standard method of optimizing a smoothing spline, mgcv is the only one that comes to mind; it offers Generalized Cross Validation (GCV) and REML to optimize the curvature. You could define your own loss function and use cross-validation to test different smoothers at different tuning values to see what is "optimal." Be warned that using cross-validation to both tune and choose between multiple methods will overfit your training data without complicated nesting. – Shea Parkes Oct 30 '12 at 0:56

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.