[R] ns() (pkg splines) vs rcs() (pkg Design)

From: Moko Kosta <mokokosta_at_yahoo.com>
Date: Wed 25 Oct 2006 - 15:20:45 GMT


Dear R-helpers,

Why the following calls result in a different output:

library(splines)
library(Design)

x <- rnorm(10)
ns(x, knots = 0, Boundary.knots = c(-1, 1)) rcs(x, c(-1, 0, 1))

Thanks in advance for any hints.

Kind Regards,
Moko Kosta



R-help@stat.math.ethz.ch 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. Received on Thu Oct 26 18:48:59 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 26 Oct 2006 - 09:30:14 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.