Using %cutpoint macro in SAS

Akhil

New Member
I think you should first try to fix which type of spline you are using. e.g, b spline, cubic spline, restricted cubic spline, quadratic spline etc. For example I used restricted cubic spline. Then, test multiple knot positions. I would recommend trying out Harrel's knot positions. Run the regression model with each of the knot positions and save the model estimates after running each equation. Then compare the fit of the models and select the model with the best fit (e.g, lowest AIC value). Also make sure your non linear models are a better fit than your linear model. In my case, RC spline with 3 knots were the best fit. Next I tried various combinations of 3 knots (e.g, at 5, 50, 95 percentiles, at 10, 50, 90 percentiles and at 25, 50, 75 percentiles. subsequently i checked the fit of the models with these models and found the 5, 50, 95 positions best fit. Ten I fit the model with the values of the continuous term corresponding to 5, 50th and 95th percentiles as knot positions and ran the model. Then after, i output the log odds ratios and then graphed it.

hlsmith

Less is more. Stay pure. Stay poor.
Thanks. Yes, I was running a Bspline. I had assumed a cubic would not be appropriate given that my shape seems to be to a higher degree than a cubic. Is that a correct assumption, or am I missing something about these types of splines.

Using AICs is an excellent idea, I had not thought of that or also just comparing the AIC between the model with and without variable with spline effect. I had been looking at the AUC values. When you run your spline(s), does it treat it as a single effect or multiple like I thought mine was doing? If it treats it as multiple, perhaps the -2logL can be used to test differences in models. I had not be able to do that when just looking at different cut points and dichotomizing, since none of the models were nested.

Are you familiar with any good textbooks or articles that cover the basics of splines? GAMs also look very interesting once a person understands splines.