I was wondering if anybody had experience in how to set the knot points when using cubic regression splines.
Some background: I have a response and predictor variable, and I want to determine the trend relationship between the two. To see what it looks like without making too many assumptions, I've fit a smoothing spline curve using the gam
function in R. The trend is obviously not linear, but otherwise well-behaved: smooth, and not too wiggly.
I'd now like to model this trend using a simple, cubic regression spline (there are various practical issues with using the gam
fit, or I'd just use that). Of course, using a regression spline requires the knots to be specified in advance. It's not too hard to do that with linear splines: I'd insert a knot where the slope of the smooth fit changes substantially, eg around local minima/maxima. However, cubic splines appear to be a more complicated story. Any guidance on where I should put the knots would be much appreciated.
proc reg
. $\endgroup$ – Hong Ooi Dec 30 '10 at 11:25