BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
desireatem
Pyrite | Level 9

data Headache;
input Minutes Group Censor @@;
datalines;
11 1 0 12 1 0 19 1 0 19 1 0
19 1 0 19 1 0 21 1 0 20 1 0
21 1 0 21 1 0 20 1 0 21 1 0
20 1 0 21 1 0 25 1 0 27 1 0
30 1 0 21 1 1 24 1 1 14 2 0
16 2 0 16 2 0 21 2 0 21 2 0
23 2 0 23 2 0 23 2 0 23 2 0
25 2 1 23 2 0 24 2 0 24 2 0
26 2 1 32 2 1 30 2 1 30 2 0
32 2 1 20 2 1
;

 

proc lifereg data=Headache;
class Group;
model Minutes*Censor(1)=Group/Dist=Weibull;
run;

 

proc phreg data=Headache;

class group;

model Minutes*Censor(1)=Group;
run;

What do I need to do to have the predictive survival probability ?

 

1 ACCEPTED SOLUTION
5 REPLIES 5
Reeza
Super User

Have you tried adding an OUTPUT statement?

 

Example

https://documentation.sas.com/?docsetId=statug&docsetTarget=statug_lifereg_examples02.htm&docsetVers...

 

Documentation for OUTPUT statement

https://documentation.sas.com/?docsetId=statug&docsetTarget=statug_lifereg_syntax10.htm&docsetVersio...

 


@desireatem wrote:

data Headache;
input Minutes Group Censor @@;
datalines;
11 1 0 12 1 0 19 1 0 19 1 0
19 1 0 19 1 0 21 1 0 20 1 0
21 1 0 21 1 0 20 1 0 21 1 0
20 1 0 21 1 0 25 1 0 27 1 0
30 1 0 21 1 1 24 1 1 14 2 0
16 2 0 16 2 0 21 2 0 21 2 0
23 2 0 23 2 0 23 2 0 23 2 0
25 2 1 23 2 0 24 2 0 24 2 0
26 2 1 32 2 1 30 2 1 30 2 0
32 2 1 20 2 1
;

 

proc lifereg data=Headache;
class Group;
model Minutes*Censor(1)=Group/Dist=Weibull;
run;

 

proc phreg data=Headache;

class group;

model Minutes*Censor(1)=Group;
run;

What do I need to do to have the predictive survival probability ?

 


 

desireatem
Pyrite | Level 9

How about for proc PHREG predictive probability.

desireatem
Pyrite | Level 9

I can get the predictive probability using proc lifereg . Now my question is how about for phreg procedure

Reeza
Super User
Did you try adding an OUTPUT statement as well to your PROC PHREG?

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1594 views
  • 0 likes
  • 2 in conversation