Hi,
I want to use the AICC criteria to select the optimal cubic spline for a non-linear association of a continuous variable with survival time outcome in proc phreg.
In proc loess I use the following command:
proc loess data=dataset plots(only maxpoints=10000)=(fitplot);
model varX=varY /select=AICC alpha=.05 all;
run;
quit;
However, this is not available in the effect statement in proc phreg. What I have done so far is running the cox model with 10 to 3 equally spaced knots to see which number of knots provides the lowest AICC.
proc phreg data=dataset;
effect varXS = spline(varX / basis=tpf(noint) NATURALCUBIC details knotmethod=equal(10));
model (entry,exit)*outcome(0)= varX / rl=wald ties=EFRON ;
run;
I would like to hear if anyone knows how to automate this process and select the knot locations based on the AICC like the proc loess example.
Thanks,
Anders