You dont need bootstrapping. The confidence intervals can be calculated with use of the effect-statement, and the PROC PLM, which should be used after running phreg. Its quite easy, as this example shows.
*first generate some data; data mydata;
do i=1 to 10000;
bmi=rand('uniform',0,10);
time=rand('exponential',exp(-sin(bmi)));
output;
end;
run; *estimate the spline, and store the result file;
proc phreg data=mydata;
effect myspline=spline(bmi / knotmethod=list(1,2,3,4,5,6,7,8,9) naturalcubic);
model time=myspline;
store result;
run; *generate the number of bmi-values where the values should be calcuated;
data template;
do bmi=0 to 10 by 0.01;
output;
end;
run; *then calculate the curve;
proc plm restore=result;
score data=template out=predicted predicted=predicted lclm=lclm uclm=uclm;
run; *transform to hazard-ratio scale ;
data predicted;
set predicted;
exppredicted=exp(predicted);
explclm=exp(lclm);
expuclm=exp(uclm);
y=exp(sin(bmi));
ruN; *plot it!;
symbol1 i=join l=1 v=none color=black;
symbol2 i=join l=2 v=none color=black;
symbol3 i=join l=2 v=none color=black;
symbol4 i=join l=1 v=none color=red;
proc gplot data=predicted;
plot (exppredicted explclm expuclm y)*bmi/overlay;
run;
... View more