1
$\begingroup$

Consider a piecewise linear function with $M$ knots:

$Y_i = \beta_1 + \beta_2x_i + \beta_{21}(x_i-\kappa_1)_+ + \beta_{22}(x_i - \kappa_2)_+ + ... + \beta_{2M}(x_i-\kappa_M)_+ + e_i$ where $(x_i-\kappa_m)_+ = (x_i-\kappa_m)$ if $(x_i-\kappa_m) > 0$ and equal to zero otherwise.

For a penalized spline, the regression parameters are estimated by minimizing

$\sum_{i=1}^N [Y_i - (\beta_1 + \beta_2x_i + \beta_{21}(x_i -\kappa_1)_+ + ... + \beta_{2M}(x_i -\kappa_1)_+)]^2 + \lambda\sum_{m=1}^M \beta_{2m}^2$, where $\lambda\sum_{m=1}^M \beta_{2m}^2$ is a penalty term.

My question is, how do I obtain the predicted value $\hat{Y_i}$?

Is $\hat{Y_i} = \hat{\beta_1} + \hat{\beta_2}x_i + \hat{\beta_{21}}(x_i -\kappa_1)_+ + ... + \hat{\beta_{2M}}(x_i -\kappa_1)_+ - \lambda\sum_{m=1}^M \hat{\beta_{2m}}^2$?

$\endgroup$

1 Answer 1

1
$\begingroup$

The penalty term is only there during training to help lower the variance of the parameter estimates and predicted values. One the parameters have been estimated, the penalty term does not play in to the structural form of the model.

Predictions are given by

$$\hat{Y_i} = \hat{\beta_1} + \hat{\beta_2}x_i + \hat{\beta_{21}}(x_i -\kappa_1)_+ + \cdots + \hat{\beta_{2M}}(x_i -\kappa_M)_+ $$

$\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.