Thank you @StatDave for your answer,
I just noticed something wrong. When I take a proc print of hr, I noticed in the output table, the HR for protein Unit=10 At protein=10 is 0.246, but since 10 was set as the reference value in the hazard ratio statement (at(protein=10)), I expected the HR should be 1.
units
Description
HazardRatio
1
protein Unit=1 At protein=10
1.063
2
protein Unit=2 At protein=10
1.051
3
protein Unit=3 At protein=10
0.855
4
protein Unit=4 At protein=10
0.61
5
protein Unit=5 At protein=10
0.496
6
protein Unit=6 At protein=10
0.431
7
protein Unit=7 At protein=10
0.374
8
protein Unit=8 At protein=10
0.325
9
protein Unit=9 At protein=10
0.283
10
protein Unit=10 At protein=10
0.246
11
protein Unit=11 At protein=10
0.213
12
protein Unit=12 At protein=10
0.185
13
protein Unit=13 At protein=10
0.161
14
protein Unit=14 At protein=10
0.14
proc phreg data=Myeloma;
effect spl=spline(protein/naturalcubic);
model Time*VStatus(0)=spl ;
hazardratio protein / at (protein=10) units=1 to 27;
ods output hazardratios=hr;
output out=out xbeta=splprot;
run;
data hr;
do units=1 to 27; set hr; output; end;
run;
proc print data=hr;
run;
proc sgplot data=hr noautolegend;
band upper=waldupper lower=waldlower x=units / transparency=.5;
pbspline y=hazardratio x=units;
xaxis label='Protein' ;
yaxis label='Hazard Ratio' ;
refline 1 / axis=y;
run;
I was wondering if you could have any thoughts on this?
Thank you,
... View more