3
$\begingroup$

I have implemented regression splines and penalised splines, with different algorithms to choose optimal lambda.

But I am still not satisfied with it as I am not able to choose the location of knots as required.

I have been using uniform knots till now, but some one suggested that quantile knots may work.

I tried to find, but could not find a good book for that.

Can you please suggest me some good books or articles for quantile knots.

Please also share if you have any valuable information regarding it.

$\endgroup$
2
  • $\begingroup$ Frank Harrell's book Regression modeling strategies (Springer 2001, 2015) discusses this idea. $\endgroup$
    – Nick Cox
    Commented Nov 4, 2015 at 23:15
  • $\begingroup$ If you want to get more exotic and computationally intensive, you can employ adaptive knot spline regression. I.e., for a fixed number of knots, let an algorithm optimize the placement of the knots per some goodness criterion. I don't have a good reference for something I can quickly find on the web which is not behind a paywall. $\endgroup$ Commented Nov 5, 2015 at 2:45

1 Answer 1

3
$\begingroup$

I am not able to choose the location of knots

For regression splines, if you want to choose the location of the knots, you can specify them anywhere you want.

If you want knots placed at some set of quantiles, calculate the quantiles you want and place knots there (you're unlikely to find more than a couple of sentences on putting knots at quantiles in a book; there's nothing to it).

For example, in R, quantile(x,ppoints(k)) :

enter image description here

$\hspace{1.25cm}$enter image description here

(here k=10) would be one way to spread knots fairly uniformly across the points of x, but exactly what you do will depend on what you want to end up with; you may want to modify this if you place knots at the boundary points.

You can get approximately what you seek by just placing knots every n/k points; the quantile(x,ppoints... trick above does almost that, except for the first and last segment (which has slightly fewer points out the ends, though it's really only noticeable in small samples)

If you want something else than this, you're going to have to clarify the question further.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.