# Knot location using quantile knots

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.

• Frank Harrell's book Regression modeling strategies (Springer 2001, 2015) discusses this idea. Commented Nov 4, 2015 at 23:15
• 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. Commented Nov 5, 2015 at 2:45

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)) :

$\hspace{1.25cm}$

(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.