Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Multiple imputation and stsum by groups

    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

  • #2
    I think I might have found a solution:

    mi passive: g survivaltime = (outdate-baseline)/365.25
    mi estimate: total survivaltime, over(edu)

    But if anyone has a smarter way to do this, I would be happy to learn

    Comment

    Working...
    X