data toxic;
input time group event;
datalines;
18 0 1
23 0 1
25 0 1
26 0 1
29 0 0
30 0 1
30 0 1
31 0 1
31 0 0
32 0 0
13 1 1
13 1 1
15 1 1
17 1 1
17 1 0
18 1 1
18 1 1
21 1 1
23 1 1
23 1 0
24 1 1
25 1 1
25 1 1
;
run;
ods pdf file='/home/lrackley0/Biostatistical Methods II/lifetest.pdf';
proc lifetest data=toxic;
	time time*event(0);
	strata group;
run;
ods pdf close;
Can someone please run this code and tell me what you get for median survival time for group 1? The 95% CI for median should be (15,25) but I am getting (15,.). Can anyone explain this? Why is it getting the wrong result?
Running your program, I do not reproduce your results. I get a range of 15,25 for median of group=1. I get this via the ods pdf, using ods html, and in the results window.
@mkeintz Thanks. Do you have any idea what could account for the discrepancy? I swear my output says 15,.
Is it a bug in SAS? I've been staring at this a long time. It is driving me insane. I have no idea what is going on. I have a track open with SAS support.
I had at first wondered if it was an ODS PDF problem, which is why I ran it also with ODS HTML. But that didn't seem to be the case.
In your case, I would completely close down the SAS session, delete the PDF file, then reload the program, re-run, and re-view your new PDF file. If that doesn't make it go away, perhaps someone else can diagnose.
It makes no difference if i use pdf or not. I always get 15,. and other people are getting 15,25. I don't get the difference. I will wait for SAS support I guess.
Hello @tarheel13,
Is the missing upper CL for the median the only discrepancy while all other statistics are correct? That would be strange. At least the upper CL for the third quartile should then be missing as well to be "consistent."
The LIFETEST Procedure
Stratum 2: group = 1
                 Product-Limit Survival Estimates
                                     Survival
                                     Standard    Number    Number
    time     Survival    Failure      Error      Failed     Left
  0.0000       1.0000           0           0       0        13
 13.0000            .           .           .       1        12
 13.0000       0.8462      0.1538      0.1001       2        11
 15.0000       0.7692      0.2308      0.1169       3        10
 17.0000       0.6923      0.3077      0.1280       4         9
 17.0000*           .           .           .       4         8
 18.0000            .           .           .       5         7
 18.0000       0.5192      0.4808      0.1430       6         6
 21.0000       0.4327      0.5673      0.1430       7         5
 23.0000       0.3462      0.6538      0.1381       8         4
 23.0000*           .           .           .       8         3
 24.0000       0.2308      0.7692      0.1317       9         2
 25.0000            .           .           .      10         1
 25.0000            0      1.0000           .      11         0
NOTE: The marked survival times are censored observations.
Summary Statistics for Time Variable time
                   Quartile Estimates
              Point         95% Confidence Interval
Percent    Estimate    Transform      [Lower      Upper)
     75     24.0000    LOGLOG        18.0000     25.0000
     50     21.0000    LOGLOG        15.0000     25.0000
     25     17.0000    LOGLOG        13.0000     21.0000
            Standard
    Mean       Error
 19.9231      1.3017
      Summary of the Number of Censored and Uncensored Values
                                                            Percent
Stratum           group       Total  Failed    Censored    Censored
      1               0          10       7           3       30.00
      2               1          13      11           2       15.38
-------------------------------------------------------------------
  Total                          23      18           5       21.74
					
				
			
			
				
			
			
			
			
			
			
			
		I am pasting my output. I am still waiting for someone who would be able to resolve this. I've never seen anything like it and no one I asked has been able to account for the discrepancy.
| 75 | 24.0000 | LOGLOG | 18.0000 | . | 
|---|---|---|---|---|
| 50 | 21.0000 | LOGLOG | 15.0000 | . | 
| 25 | 17.0000 | LOGLOG | 13.0000 | 21.0000 | 
@tarheel13 wrote:
I am pasting my output. I am still waiting for someone who would be able to resolve this. I've never seen anything like it and no one I asked has been able to account for the discrepancy.
75 24.0000 LOGLOG 18.0000 . 50 21.0000 LOGLOG 15.0000 . 25 17.0000 LOGLOG 13.0000 21.0000 
How strange. So, at least the upper CL for the third quartile is also missing. But the other parts of the output, i.e. Mean, Standard Error, Survival Estimates and Censored Summary are exactly the same as shown in my output?
For example, your quartile estimates (and CLs) would be correct for a dataset where just the last two values of variable EVENT were changed from 1 to 0. But, of course, this change would affect other statistics as well.
Other things one could check in this situation:
I did not touch any templates. Plot looks good to me. @FreelanceReinh @mkeintz mind telling me what version of SAS you guys are using? I tried SAS OnDemand and DM SAS. I am going to show you the response I got from SAS support. It seems to be something with a hot fix. My question is which one is correct? So I actually work as a statistical programmer and even though this was just for class, it's very important for me to get the right numbers in tables. I wouldn't want to put 25 if it was actually NE (not estimable).
You didn't say what releases of SAS are involved here but one I think must be SAS9.4 TS1M6 = SAS/STAT 15.1 with a Hot Fix applied for a bug with the quartile upper confidence limits (quartile UCL) or it could be SAS9.4 (TS1M7) = SAS/STAT 15.2 where the bug is fixed. I think this would be for your system which is showing missing quartile UCL apparently.
So, I think I can explain why some quartile upper confidence limits (quartile UCL) may have changed to missing in SAS9.4 (TS1M6) = SAS/STAT 15.1 or in SAS9.4 (TS1M7) = SAS/STAT 15.2.
I suspect that your system has had the Hot Fix discussed on the Hot Fix tab in the following SAS Note applied which could cause the quartile UCL to change in 15.1; see the Hot Fix tab in the following SAS Note:
Problem Note 64617: The LIFETEST procedure produces incorrect upper confidence limits for the quartiles for certain data
https://support.sas.com/kb/64/
Often we see that after the Hot Fix is applied that some quartile UCL do not exist and are then reported as missing but this does not rule out other changes as well. Note that the Hot Fix is specific to SAS9.4 (TS1M6) = SAS/STAT 15.1 and your professor should try applying it in that release.
Now that you mention it, I remember that I had heard about this (somewhat alarming) Problem Note 64617, but I haven't applied the hot fix. I'm using SAS 9.4 (TS1M5) with SAS/STAT 14.3, so my printed results might be wrong.
Indeed, a manual calculation of the upper CL for the median suggests that it is not estimable and hence should really be missing:
Yet, strangely enough, the second condition of Problem Note 64617 is not met: The largest event time, t=25, is not "the first time the survival estimate drops below (1-p) for the 100pth percentile point," i.e., below 0.5. It's t=21 where that happens (0.43...).
I actually saved a CSV and ran this in R with survfit and also got NE so I'm inclined to believe that NE is more correct. It is kind of strange though. I don't really know how to apply the hot fix but I think I have a later version of SAS. I think the hot fix is not widely known. I think I will stop worrying about this but wish that it was more reliable and that all 3 of us got the same results.
I am using SAS 9.4 (TS1M6) and SAS/STAT 15.1. I haven't done any hotfixes.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.