cmr.p...@gmail.com wrote:
Hello group!

Is there a package that allows to fit smooth *periodic* splines to
data? I'm interested in a function which combines the functionality of
smooth.spline and splines::periodicSpline.

I don't know one, but you could use the same technique that periodicSpline uses: repeat a copy of the data to the left and right of the main copy (similarly replicating the knots if you want regression splines rather than smoothing splines), then fit to the augmented dataset. I don't think it is guaranteed to be exactly periodic, but it will be very close.

There is also the "periodic" option to splinefun and you might be able to use it to construct a true periodic basis, but you'll have to work out some tricky details to get that right.

Duncan Murdoch

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to