2
$\begingroup$

I'm working through Introduction to Statistical Learning and came upon this:

One can show that adding a term of the form $ \beta_4h(x,\xi)$ to the model (7.8) $$y_i = \beta_0 + \beta_1x_i + \beta_2x_i^2 + \beta_3x_i^3 + \epsilon_i$$ for a cubic polynomial will lead to a discontinuity in only the third derivative at ξ; the function will remain continuous, with continuous first and second derivatives, at each of the knots.

How can one show this? Why is this the case?

$\endgroup$
1
  • $\begingroup$ Given the degree, you want to make it as smooth as you can without making it pointless to do a spline at all. If the third derivative was continuous as well, you'd just have a single cubic over the whole line. Stopping at 2nd derivatives gives you one additional df at each new knot, the smallest you can have while still doing something when you add a knot. $\endgroup$
    – Glen_b
    Commented Jun 18, 2019 at 6:46

1 Answer 1

1
$\begingroup$

It's because that's the basis representation of a spline. A higher degree spline actually increases the smoothness of the curve at the risk of having less dramatic directional changes (with the extreme being piecewise linear). The basis representation for a third-order spline with, say, a breakpoint at 5 is equivalent to

$$ \left[ \begin{array}{cccc} 0 & 0 & 0 & 0 \\ 1 & 1 & 1 & 0 \\ 2 & 4 & 8 & 0 \\ 3 & 9 & 27 & 0 \\ 4 & 16 & 64 & 0 \\ 5 & 25 & 126 & 0 \\ 6 & 36 & 216 & 1 \\ 7 & 49 & 343 & 8 \\ 8 & 64 & 512 & 27 \\ 9 & 81 & 729 & 64 \\ 10 & 100 & 100 & 126 \\ \end{array}\right] $$

The first column is the linear term, the second column is the quadratic term, the third column is the ordinal cubic term, the fourth column is the breakpoint which is 0 for all values less than the breakpoint and amounts to $(x - 5)^3$ for all positive values.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.