3
$\begingroup$

I am trying to understand why regression splines are continuous at their knots

Suppose I am fitting a regression spline

$$ E[Y|X] = \alpha + \beta_1 x + \beta_2 (x - t)^+ $$

where $(x - t)^+ = \max (x-t,0)$.

Now, if I take the partial derivative of $y$ wrt $x$, I find

$$ \frac{\partial y}{\partial x} = \begin{cases} \beta_1 \quad \text{if} \quad x \leq t,\\ \beta_1 + \beta_2 \quad \text{if} \quad x > t \end{cases} $$

For starters, is this correct?

If it is, I don't see how this shows the derivative at $t$ is continuous - it looks like there is a discrete change rather than smooth change

$\endgroup$
2
$\begingroup$

You correctly found the derivative.

With linear splines, the function is continuous but its first derivative is not; there's a jump discontinuity at each knot.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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