>>>>> "SK" == Stephan Kolassa <stephan.kola...@gmx.de> >>>>> on Tue, 31 Mar 2009 22:20:50 +0200 writes:
SK> Hi David, SK> David Winsemius schrieb: >> The splinefun documentation indicates that "natural" is one of the types >> of cubic spline options available. SK> That sounds good, didn't know that... rcs() has the advantage of coming SK> with a book (Harrell's "Regression Modeling Strategies"). well, and splinefun() comes with R !!! >> Does rcs actually do fitting? Such would not be my expectation on >> reading the documentation and I do not see any examples of such >> functionality in the help pages. SK> Nope, but you can include rcs() within fitting functions, SK> lm(foo~rcs(bar,3)), which makes more sense to me than having a spline SK> function fit... Looks like better encapsulation to me. well, but ns() has been part of the S language for ages, and part of R since its very early days, exactly for the purpose to be used in something like lm(y ~ ns(.) + ..) So while rcs() may have extra merits, (I assume it does, as I assume Frank Harrell will have known about ns()), in order to solve the OP's problem, I still believe that "standard R" [and "good old S version 3 for that matter] contains all functionality needed. Martin Maechler, ETH Zurich SK> Best, SK> Stephan SK> ______________________________________________ SK> R-help@r-project.org mailing list SK> https://stat.ethz.ch/mailman/listinfo/r-help SK> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html SK> and provide commented, minimal, self-contained, reproducible code. ______________________________________________ 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.