Summary: [S] bases of B-splines
E-mail: s-news@wubios.wustl.edu
Hi!
I received several informative replies to my
question on how to draw bases of B-splines.
Let me give a summary of them:
If you need bases of B-spline with knots at
(1,1,1,1,2,3,3,3,3), the program should be something
like:
xx <- seq(from = 1, by = 0.1, to = 3)
knots <- 2
bs1 <- bs(x = xx, knots = knots, intercept=T)
print(bs1)
You are supposed to input the positions of interior
knots only, and "intercept=T" is required.
You can specify all knots when you use "spline.des()":
xx <- seq(from = 1, by = 0.1, to = 3)
knots <- c(1,1,1,1,2,3,3,3,3)
bs2 <- spline.des(knots = knots, x=xx)
print(bs2)
When you use "spline.des()", knots at the both ends may not
be multiple knots(4th knots).
My concern now is why multiple knots(4th knots) is
so popular as boundary condition for B-splines.
I feel that this boundary condition do not correspond
to boundary conditions on derivatives, while boundary
conditions for natural spline hold clear meaning on derivatives.
I am wondering if there is some advantage of this
treatment of boundary for B-splines exept a small number
of parameters.
This topic is slightly different from usage of S-plus,
so that please give me personal E-mails on this problem.
***** Kunio Takezawa, Ph.D. (takezawa@affrc.go.jp) *****
***** Research Information Section *****
**** Hokuriku National Agricultural Experiment Station, JAPAN ****
***** <http://www.inada.affrc.go.jp/~takezawa/patent-e.html> *****
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news
|