Obsidian | Level 7

## Proc lIfetest : Different results from product-limit-estimate table and atrisk

Hi,

My code -

ods output productlimitestimates = sds ;

proc lifetest data=graph2_B_G  timelist= 0 100 200 300 400 500 600 700 800 900 1000 plots=(survival( atrisk=0 to 1000 by 100 ) )maxtime = 1000;
time time*status(0);
strata drg_class_detail;
run;

The numbers that i get from the product-limit-estimate table (number surviving) are not the same as the numbers i get on the graph with the atrisk number. Can anyone please help explain why that is the case?

What is the difference in the calculation?

even the numbers for the time-0 are different

Eg;

 Atrisk Product-lim-estimate time group1 group2 group1 group2 0 2050 2050 2043 2048 100 1454 1481 1451 1480 200 1186 1217 1182 1213 300 894 848 892 845

1 ACCEPTED SOLUTION

Accepted Solutions

## Re: Proc lIfetest : Different results from product-limit-estimate table and atrisk

Hi @riyaaora275,

Your survival times are discrete. The numbers of subjects at risk in the graph (denoted by Yi in section Breslow, Fleming-Harrington, and Kaplan-Meier Methods of the PROC LIFETEST documentation) are counted "just prior to" the respective time points, whereas the columns "Number Left" and "Number Failed" in the table "Product-Limit Survival Estimates" (i.e., variables Left and Failed in your dataset sds) take the events (failures or censoring) at the respective time points already into account (event by event) -- not at time 0, though, when using the TIMELIST= option. So the small differences are the numbers of subjects whose event times equal 0, 100, 200, etc., respectively.

## Re: Proc lIfetest : Different results from product-limit-estimate table and atrisk

Hi @riyaaora275,

Your survival times are discrete. The numbers of subjects at risk in the graph (denoted by Yi in section Breslow, Fleming-Harrington, and Kaplan-Meier Methods of the PROC LIFETEST documentation) are counted "just prior to" the respective time points, whereas the columns "Number Left" and "Number Failed" in the table "Product-Limit Survival Estimates" (i.e., variables Left and Failed in your dataset sds) take the events (failures or censoring) at the respective time points already into account (event by event) -- not at time 0, though, when using the TIMELIST= option. So the small differences are the numbers of subjects whose event times equal 0, 100, 200, etc., respectively.

Discussion stats