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

Hello Community,

I am a graduate student, I'm trying to figure out... what is wrong with my syntax... I went to the sas support page and I still can't get it to work...

Do I need a small modification to the following proc life test code or do i need to use a macro of some sort?

Below is my code from a book ( no names and identifiable information)

The first column I coded 1=Partial Remission and 2=Complete Remission, second column is time to relapse, and third column, 0= censored observations

From the log it appears there is an issue with the command kernel which I need to estimate a hazard rate with band wind=6 months using a uniform kernel, I need to do the same for biweight.

data Q1;

input res t rel ;

datalines;

1 10 1

1 6 1

1 20 0

1 35 0

1 6 1

2 7 1

2 32 0

2 23 1

2 22 1

2 16 1

2 34 0

2 32 0

2 25 0

2 11 0

2 19 0

2 6 1

2 17 0

2 13 1

2 9 0

2 6 0

2 10 0

;

run;

proc lifetest data=Q1 (where=(rel=1))plots=hazard(bw=6) aalen kernel=U outtest=test;

time t*rel(0);

run;

1 ACCEPTED SOLUTION

Accepted Solutions
SteveDenham
Jade | Level 19

I think the (where=(rel=1)) in the PROC LIFETEST code is subsetting your Q1 dataset.  Try running without it.  The following worked for me:

proc lifetest data=q1 nelson plots=(hazard(bw=6 kernel=U)) outest=test;

time t*rel(0);

run;

Note some rearrangement in the plots= option and a substitution (nelson for aalen)

Steve Denham

Message was edited by: Steve Denham

View solution in original post

2 REPLIES 2
SteveDenham
Jade | Level 19

I think the (where=(rel=1)) in the PROC LIFETEST code is subsetting your Q1 dataset.  Try running without it.  The following worked for me:

proc lifetest data=q1 nelson plots=(hazard(bw=6 kernel=U)) outest=test;

time t*rel(0);

run;

Note some rearrangement in the plots= option and a substitution (nelson for aalen)

Steve Denham

Message was edited by: Steve Denham

jengarcia1122
Calcite | Level 5

It's funny I just got it to run before I read your response, I didn't include kernel in the parentheses. Thank you Steve! I will omit the where statement since I don't want to subset the data.

Thank you for your swift assistance!

Very grateful Graduate student,

Jennifer Garcia

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
  • 2 replies
  • 1375 views
  • 0 likes
  • 2 in conversation