0
$\begingroup$

In GAM, a general approach is to use B-spline basis expansion to approximate the true nonparametric function. Usually the edge knots are chosen as the minimum and maximum of the training data (for continuous predictors). However, it is very possible that a predictor in the testing data fall outside of the range between the training minimum and maximum. The B-spline basis expansion on the training set was not defined on such values. What are the possible ways to handle these points?

(For example, how does the bs() function in R handle these points?)

$\endgroup$
  • 1
    $\begingroup$ Beyond the general dangers of extrapolation, is there some reason why you can't use restricted cubic splines, which enforce linear extrapolation beyond the original data limits? $\endgroup$ – EdM Jun 3 at 15:26
  • $\begingroup$ @EdM Thanks for replying. In practice we can definitely use restricted cubic splines, but for this problem I have to use B-spline. That's why I'm trying to understand how functions like bs()/splev handle these points. $\endgroup$ – kaixu Jun 3 at 15:33

Your Answer

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

Browse other questions tagged or ask your own question.