I often use B-splines for regression. Up to now I\'ve never needed to understand the output of bs
in detail: I would just choose the model I was interested in, and
Just a small correction to the excellent answer by @DeltaIV above (it looks like I can not comment.)
So in b1
, when he calculated b1(x[3])
, it should be (38.83333-17.9)/(38.83333-13.3)=0.8198433
by linear interpolation. Everything else is perfect.
Note b1
should look like this
\frac{t}{13.3}I(0<=t<13.3)+\frac{38.83333-t}{38.83333-13.3}I(13.3<=t<38.83333)