Help using Base SAS procedures

proc life test procedure with uniform and biweight kernel smoothing

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 17
Accepted Solution

proc life test procedure with uniform and biweight kernel smoothing

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;


Accepted Solutions
Solution
‎10-30-2014 03:30 PM
Respected Advisor
Posts: 2,655

Re: proc life test procedure with uniform and biweight kernel smoothing

Posted in reply to jengarcia1122

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


All Replies
Solution
‎10-30-2014 03:30 PM
Respected Advisor
Posts: 2,655

Re: proc life test procedure with uniform and biweight kernel smoothing

Posted in reply to jengarcia1122

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

Occasional Contributor
Posts: 17

Re: proc life test procedure with uniform and biweight kernel smoothing

Posted in reply to jengarcia1122

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

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 212 views
  • 0 likes
  • 2 in conversation