[R] Smooth periodic splines

Spencer Graves spencer.graves at pdf.com
Fri Jan 16 21:54:27 CET 2009


      1.  RSiteSearch('{periodic spline}') produced 12 hits.  I looked 
at the first five and found that four of them seemed relevant to your 
question. 

      2.  The third hit in this list notes that the DierckxSpline 
package has periodic splines, while 'fda' recommends finite Fourier 
series for periodic functions;  this hit documents an "as.fd" function 
that approximates a 'dierckx' periodic object with a periodic 'fd' object. 

      Hope this helps. 
      Spencer

Duncan Murdoch wrote:
> cmr.Pent at 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 at 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.




More information about the R-help mailing list