Displaying 1 result from an estimated 1 matches for "p127".
Did you mean:
127
2011 Aug 16
0
Cubic splines in package "mgcv"
...writes, this basis is not actually used by mgcv when
specifying bs="cr".
Maybe the point is that at the knot, this continuous function has
continuous 1st and 2nd derivatives, but a discontinuous 3rd derivative, so
in that sense it behaves like a cubic spline.
Greg
#using the code from p127 of Wood:
#compare Wood Fig 3.4 (p125)
#if the function were piecewise cubic the 3rd derivative would be
piecewise constant
rk<-function(x,z)
{
((z-0.5)^2-1/12)*((x-0.5)^2-1/12)/4-((abs(x-z)-0.5)^4-(abs(x-z)-0.5)^2/2+7/240)/24
}
par(mfrow=c(2,2))
u<-seq(0,1,by=0.001)
plot(u,rk(u,5/6),main=&q...