Linear splines with convenient parameterizations such that:
- coefficients are slopes of consecutive segments
- coefficients capture slope change at consecutive knots
Knot locations can be specified
- manually (
lspline()) - at breaks dividing the range of
xintoqequal-frequency intervals (qlspline()) - at breaks dividing the range of
xintonequal-width intervals (elspline())
Inspired by Stata command mkspline and function lspline() from package ares (Junger and Ponce de Leon 2011). As such, the implementation follows Greene (2003), chapter 7.5.2.