BookmarkSubscribeRSS Feed
ChuksManuel
Pyrite | Level 9

Hello,

 

Please i am a user of  R and i want to know how this problem can be tackled in SAS.

 

 I've been working on this R code and tried to replicate it in SAS.

 

survdiff(formula=Surv(time,status)~Tx, data=leuk, rho=0).

 

I know sas has a code where you request for the logrank test, but i want to be able to change my "rho". I can do that in R relatively easily and i want to know if there's a way it could be done in SAS.

A typical program for the log rank test in SAS is this:

proc lifetest method=km plots=(s) data=bmtZ10eq1;
strata grp / test= logrank;
time T2*d3(0) ;

 Two question i have is: What rho was used in the SAS program and is it possible to vary my value of rho in SAS?

For example,  in R, rho=0: chi Squre=16.8; P value=0.0000417 and when i changed my rho =1, Chisqure=14.5; P value= 0.000143

 

Thanks

1 REPLY 1
art297
Opal | Level 21

Not an area I'm familiar with, but doesn't Rho in R simply control the type of test used (i.e., with 0=logrank and 1=peto)?

 

If so, you're already controlling it with the test option.

 

Art, CEO, AnalystFinder.com

 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is ANOVA?

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.

Discussion stats
  • 1 reply
  • 829 views
  • 0 likes
  • 2 in conversation