4
$\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$
1
  • $\begingroup$ I am learning from your question. What is a good example for x & x-t ? and how is the 1st derivate beta1 when x<=t $\endgroup$
    – Science11
    Commented Jan 27, 2023 at 5:35

1 Answer 1

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 and acknowledge you have read our privacy policy.

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