I have a dataset with multiple imputations in which I have performed Cox regression:

mi stset outdate, failure(death=1) (origin time baseline) scale(365.25)

mi estimate: stcox i.edu


I would like to display the number of deaths and survival time by educational groups.

I have tried:

stsum
stsum, by(education)

but when I include the by-option, the sum of cases and survival time from each educational group is not equal to the total number of cases and survival time displayed by stsum (because the command excludes those for which edu originally was missing, I assume).

I can find the total number of cases by:

mi estimate: total death, over(edu)

But how do I find the survival time in each educational group?


I apologize for not including my output, as my data is in a secured server. I hope someone might be able to help anyway.

Best regards,
Amalie