0
$\begingroup$

I am trying to come up with the B-spline basis matrix of natural cubic spline. I searched up and down the Internet and the only thing can find is the ns() function in R. The output is exactly what I want, but I would like to understand how this is done internally so that I can code similar things myself.

$\endgroup$
  • $\begingroup$ Read the associated reference? To see the function: edit(ns). $\endgroup$ – user81847 Feb 18 '16 at 7:40
  • $\begingroup$ There is no reference for ns() $\endgroup$ – Tom Bennett Feb 18 '16 at 8:02
  • 2
    $\begingroup$ Hastie, T. J. (1992) Generalized additive models. Chapter 7 of Statistical Models in S eds J. M. Chambers and T. J. Hastie, Wadsworth & Brooks/Cole. $\endgroup$ – user81847 Feb 18 '16 at 8:03
  • $\begingroup$ ... as the "references" section of the help page says. $\endgroup$ – cbeleites supports Monica Feb 18 '16 at 11:29

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.