>>>>> "SpG" == spencerg <

[hidden email]>

>>>>> on Tue, 31 Mar 2009 07:35:07 -0700 writes:

SpG> Hello:

SpG> If B-splines will suffice, there are many capabilities in R for

SpG> that. My favorite is the 'fda' package, but 'splines' and other

SpG> packages are also good.

SpG> The "splinefun" function in the "base" package returns a function

SpG> to compute spline interpolations optionally using a natural spline.

SpG> However, that is an interpolation spline and therefore does no smoothing.

SpG> To find other options for natural splines, I suggest you try the

SpG> CRAN packages splines, mboost, pspline, Design, and mgcv. I found them

SpG> using the "RSiteSearch" packages available from R-Forge via

SpG> 'install.packages("RSiteSearch", repos="

http://r-forge.r-project.org")',

SpG> which also identified the "siggenes" package (which is not on CRAN). I

SpG> don't know if any of these actually use natural splines, but this gives

SpG> you a reasonably short list to consider.

Just a quick note with a small correction:

'splines' is *not* a CRAN, but a "standard R" aka "base R"

package that has "always" been "with us", and in my eyes contains

(almost IIRC) everything you'd ever want for univariate natural splines.

In particular, note the 'Priority' and 'Author' fields in

> packageDescription("splines")

Martin Maechler, ETH Zurich

SpG> Hope this helps.

SpG> Spencer Graves

SpG> p.s.

[.........]

SpG> minben wrote:

>> Suppose I have two var x and y,now I want to fits a natural cubic

>> spline in x to y,at the same time create new var containing the

>> smoothed values of y. How can I get it?

______________________________________________

[hidden email] mailing list

https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide

http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.