Open arbenede opened 1 year ago
This is a good question. The B-splines can be easily adapted to calculate the P-spline basis and the difference penalty matrix would not be difficult to calculate.
Can you suggest an API for penalised splines? Perhaps something like ps(x,df=8)
, ps_(x,df=8)
and pen_ps(df=8)
?
If df
is the number of basis elements, how about something like ps(start,stop,df=20,order=4)
? Of course start
and stop
are the limits of the range where the B-spline basis is defined. Referring to the picture below [1, pag. 185], start=0
and stop=1
:
[1] Marx, B. D., Eilers, P. H. (2021). Practical Smoothing: The Joys of P-splines. Cambridge University Press.
Any plans to support P-splines?