I ran a survival analysis through Phreg. The results of my parameters analysis suggests the risk for my variable is higher but in plots provided by Phreg, the survival curves are opposite..Can anyone tell me what is going on with phreg?
Here is my phreg code:
proc phreg data=payer1 plots(overlay)=(survival cumhaz) ;
class plan_type (ref='OTHER') ;
ID patient_identifier;
model life2*censor(0)=plan_type /rl ;
baseline covariates=payer1 out=Pred1 outdiff=diff1 / diradj group=first_plan_type ;
output out=ResidCheck ressch=schoenfeld loglogs=lls logsurv=h RESMART=mgale RESDEV=Deviance RESSCO=score
/method=ch order=data;
run;
Here is my results (attached pdf has better format) :
plan_type | MDCD | 1 | 0.42425 | 0.24377 | 3.0287 | 0.0818 | 1.528 | 0.948 | 2.465 | PLAN_TYPE MDCD |
From the result, the plan type "MDCD" is risker than my reference plan type "Other". Hazard Ratio is positive and greater than 1. However, in my attached chart (plotted by Phreg). the survival curve for MDCD is better than that of Other, which contradict to the parameter estimate results. Can anyone tell me what is wrong here?
@WillZh wrote:
I ran a survival analysis through Phreg. The results of my parameters analysis suggests the risk for my variable is higher but in plots provided by Phreg, the survival curves are opposite..Can anyone tell me what is going on with phreg?
Here is my phreg code:
proc phreg data=payer1 plots(overlay)=(survival cumhaz) ;
class plan_type (ref='OTHER') ;
ID patient_identifier;
model life2*censor(0)=plan_type /rl ;
baseline covariates=payer1 out=Pred1 outdiff=diff1 / diradj group=first_plan_type ;
output out=ResidCheck ressch=schoenfeld loglogs=lls logsurv=h RESMART=mgale RESDEV=Deviance RESSCO=score
/method=ch order=data;
run;
Here is my results (attached pdf has better format) :
Parameter DF Parameter Estimate Standard Error Chi-Square Pr > ChiSq Hazard Ratio Lower 95% Confidence Limit Upper 95% Confidence Limit Label
plan_type MDCD 1 0.42425 0.24377 3.0287 0.0818 1.528 0.948 2.465 PLAN_TYPE MDCD
From the result, the plan type "MDCD" is risker than my reference plan type "Other". Hazard Ratio is positive and greater than 1. However, in my attached chart (plotted by Phreg). the survival curve for MDCD is better than that of Other, which contradict to the parameter estimate results. Can anyone tell me what is wrong here?
What happens if you look at the survival plot? You’re currently looking at the diradj graph which is based on averaging the data in your baseline statement.
If I removed diradj from my code, I am not able to add labels to the survival curves and thus tell which curve is which type..How can I add labels in survival plots?..
I also added my dataset here in case you like to run it.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.