With the data on the survival for each group, is it possible to analyze on average how long each group lived? For example, with the data can we see if the high SES white group lived on average a certain number of years more in comparison to the low SES white group programmatically? I know I can see the difference here in the graph. Similarly with other group comparison
data test;
infile datalines dsd truncover;
input @1 subjid $7. @8 race_ses $20. @29 Years 5. @35 death 1.;
datalines;
6309 White, Medium SES 1.349 1
32678 Minority, Low SES 0.000 0
47274 White, Medium SES 0.501 0
66354 Minority, High SES 0 0
71686 White, High SES 0.002 1
97865 White, Medium SES 1.440 0
99032 Minority, Low SES 0.210 1
106165 Minority, Low SES 0.180 0
119509 White, High SES 0.254 0
120822 Minority, Low SES 2.212 0
128824 White, Medium SES 0 0
141997 White, Medium SES 0 1
154519 White, Medium SES 1.349 0
166227 White, High SES 0.057 0
180478 White, High SES 0 1
193038 White, Medium SES 0.002 0
200805 Minority, Medium SES 0.002 0
239179 White, High SES 0.254 0
248023 White, Medium SES 2.212 0
250211 Minority, Low SES 0 1
257887 Minority, Medium SES 0 0
280576 White, Medium SES 1.349 0
281024 Minority, Medium SES 0.057 0
288389 White, Medium SES 0 0
299579 White, High SES 0.002 0
304910 Minority, Medium SES 0.002 1
306267 White, High SES 2.537 0
308474 Minority, Medium SES 2.028 1
310910 White, High SES 0 0
;
run;
ods output survivalplot = output_data;
proc lifetest data = test method = km plots=s(test)
timelist = 0 1 2 5 10 15 20 25 30 conftype = linear;
time years * death(0);
strata race_ses;
run;
Thanks
... View more