Skip to content
Prev 242073 / 398500 Next

where are my pspline knots?

The pspline function uses P-splines (Eilers and Marx, Statistical
Science, 1981), which are a spline basis using a regular set of knots. 

Looking at the code for pspline, which isn't so hard, let
	dx = (max(x) - min(x))/ nterm    where nterm is round(2.5 * desired
degrees of freedom)

 The knots go from min(x) -df*dx to max(x) + df*dx.
 The default df is 4.

 Once the knots are known, the bs() function generates the pspline basis
for me.

Terry T