☑ This topic is solved.
Need further help from the community? Please
sign in and ask a new question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 2 weeks ago
(301 views)
I tried to use phreg (code shown below) to calculate the Hazard Ratios of these variables and here age was included as a spline.
proc phreg data=test; effect spl_age = spline(age / basis=bspline knotmethod=percentilelist(25 75) ); class sex(ref="0") race(ref="0") Hypertension(ref="0") Diabetes(ref="0") Region(ref="0"); model (start,stop)*Censor(0)= sex race Hypertension Diabetes Region spl_age/ risklimits eventcode=1; id usubjid; run;
The code works but I got a message show below: Hazard ratios that cannot be conveniently calculated or displayed are set to missing in the ParameterEstimates table. Use the HAZARDRAT10 statement to compute the needed hazard ratios. I wonder if anything wrong with the code, especially age was treated as a spline. Many thanks.
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I think that is because you are using spline(non-linear) effect for AGE. sas can not easily calculate HR as other variables by using EXP option of model.
Therefore , you need special statement to get it. Like:
model (start,stop)*Censor(0)= sex race Hypertension Diabetes Region spl_age/ risklimits eventcode=1;
HAZARDRATIO age;
Therefore , you need special statement to get it. Like:
model (start,stop)*Censor(0)= sex race Hypertension Diabetes Region spl_age/ risklimits eventcode=1;
HAZARDRATIO age;
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I think that is because you are using spline(non-linear) effect for AGE. sas can not easily calculate HR as other variables by using EXP option of model.
Therefore , you need special statement to get it. Like:
model (start,stop)*Censor(0)= sex race Hypertension Diabetes Region spl_age/ risklimits eventcode=1;
HAZARDRATIO age;
Therefore , you need special statement to get it. Like:
model (start,stop)*Censor(0)= sex race Hypertension Diabetes Region spl_age/ risklimits eventcode=1;
HAZARDRATIO age;