The BSpline in mathematica is defined mathematically here. These BSplines constitute basis for any Spline. But how do I define natural splines in mathematica, i.e. splines that are linear left of the leftmost knot and right of the rightmost knot?

How can I perform generalized linear regression with natural splines?


closed as off-topic by Anton Antonov, MarcoB, garej, Edmund, LCarvalho Jun 12 at 17:52

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question cannot be answered without additional information. Questions on problems in code must describe the specific problem and include valid code to reproduce it. Any data used for programming examples should be embedded in the question or code to generate the (fake) data must be included." – garej, LCarvalho
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    $\begingroup$ What have you tried so far? Do you have any more detail that you could add to your question? $\endgroup$ – Carl Lange Jun 7 at 7:11
  • $\begingroup$ My expectation was that because natural splines are so common they should have had a default implementation. $\endgroup$ – Al Guy Jun 8 at 15:31