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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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