There is some data I want to fit B-splines to and I already have a scheme for the location of the knots, but I want to use cross-validation to find the optimal number of knots. Is there any built-in R function (or external package) I can use for this rather than coding it by myself?



Browse other questions tagged or ask your own question.