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

 

Hello,

 

I'm trying to derive the p-value for a stratified log-rank test using lifetest. The specs are such:

 

A stratified log-rank test will be used to test the equivalence
hypothesis of survival distributions. The stratification factors are
the randomization stratification factors. The LIFETEST procedure in
SAS with the TIME statement including a variable with survival times
and a (right) censoring variable, with STRATA statement for the
stratifying variable and the GROUP option for identifying treatment
arms will be used to obtain one sided p-value from log-rank score
test. The implementation is as follows.
PROC LIFETEST data=dataset METHOD=KM CONFTYPE=LOGLOG;
     TIME survtime*censor(1);
     STRATA stratum1 stratum2 stratum3 / GROUP=trt;
RUN;
/* stratum1 stratum2 stratum3 represents the 3 stratum variables (to
be included for stratified analysis only);
   survtime represents variable containing event/censor times;
   censor represents censoring variable (1=censored, 0=event);
   trt represents treatment arm variable; */

 

I need to capture the ods output into a dataset for reporting. This is the current code:

 

ODS TRACE ON;
ODS OUTPUT ;


    PROC LIFETEST data=pop3_sall METHOD=KM CONFTYPE=LOGLOG  ;
     Time months*event(0);
     STRATA STRVAL1 STRVAL2 STRVAL3 / GROUP=TRT01PN ;
    RUN;


ODS OUTPUT CLOSE;
ODS TRACE OFF;

 

Which ODS output dataset needs to be captured and does it require extra code to derive the p-value?

 

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

You move from a one sided p-value to a 2 sided p-value by mulitplying 2....so that might be what's happening here

View solution in original post

5 REPLIES 5
ballardw
Super User

I think you want as part of the proc code:

 

ods output homtests= youroutputset;

bentleyousley
Calcite | Level 5
Thank you for responding. I originally used "homtests" for the output dataset, but the p-value doesn't seem to make sense based on the table I'm checking. The discription in the footnote says:
"P-value is obtained from the one-sided stratified logrank test". The p-value based on homtests is: 0.0898 and the table reports: 0.045. Any ideas?
Thank you for your help!
Reeza
Super User

You move from a one sided p-value to a 2 sided p-value by mulitplying 2....so that might be what's happening here

ballardw
Super User

Without your data it's a bit difficult to diagnose any specific values.

 

For the example procedure I run the values as appearing in the output were in that table, unless you're looking at a different table.

 

You would have to post the table with the values you're referencing and preferably the data that generated the output. The data need not be real or complete but sufficient to generate example output and should be in the form of datastep code.

Reeza
Super User
Do you see the value you want in the output from the code above?

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 5 replies
  • 19619 views
  • 0 likes
  • 3 in conversation