BookmarkSubscribeRSS Feed
Stephen_Q
Obsidian | Level 7

When I do survival analysis,all strata have events, but why still got this warning: "The likelihood ratio test for strata homogeneity is questionable since some strata have no events." ?

 

Log as below: 

 

Output Added:
-------------
Name: HomTests
Label: Homogeneity Tests
Template: Stat.Lifetest.HomTests
Path: Lifetest.ByGroup3.StrataHomogeneity.HomTests
-------------
WARNING: The likelihood ratio test for strata homogeneity is questionable since some strata have no events.

 

 

My code as below, in my dataset cnsr value inclued (0 1), and all trt01an have events(0 1). Why still got this warning? What the meaning?

Does it affect other analyses like ProductLimitEstimates, Quartiles etc. ? Is this survival analysis still valid?

proc lifetest data=adtte timelist=(0 to 20 by 2) atrisk outsurv=surviv reduceout;
by TYPEN;
time aval*cnsr(1);
strata trt01an;
run;
5 REPLIES 5
Ksharp
Super User
Maybe 'aval' has some MISSING value. SAS would delete the entire row if any one of 'aval' 'cnsr' have a missing value .
Using PROC FREQ to check whether each treatment have event or not:

proc freq data=adtte;
where aval is not missing;
table TYPEN*trt01an*cnsr/list;
run;
Stephen_Q
Obsidian | Level 7

Thanks for your reply, 'aval' and 'cnsr' both have no missing value, but some 'TYPEN' dosn't has all   trt01an*cnsr, is that what's causing this? If so how to solve it?

Ksharp
Super User
"but some 'TYPEN' dosn't has all trt01an*cnsr, is that what's causing this? If so how to solve it?"
Yes. That is where the problem is.
Just keep the validate(integerate) combination of trt01an*cnsr.
a.k.a. at least two levels in trt01an and two levels in cnsr .
Stephen_Q
Obsidian | Level 7

For example,trt01an value inclued(1 2), cnsr value inclued(0 1). I mean some 'TYPEN' only has (trt01an=1 and cnsr=0) ,(trt01an=1 and cnsr=1) ,(trt01an=2and cnsr=0) , dosn't has (trt01an=2and cnsr=1), right?

If so, but in aother dataset, it's a similar situation, The log has no warning.

Ksharp
Super User
Yes. Delete those records and run the code again. If there is not any warning ,that is to say where the problem is. If not then better post sample data ,so can test your code.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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