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
Related Posts with Multiple imputation and stsum by groups
Cross sectional dependence for firm panel dataDo we conduct a cross sectional dependence test for panel data with N being listed firms and T being…
By ID_number, keep registry-based (baseline=0) test dates obtained 1 year after original (baseline=1) study’s test dateReally need help! With the expert guidance of a statistician, I merged (using the append command) a …
Keep variable1 if 1 observation per year OR*the minimum number for a variable2 if > 1 observations per yearNeed help! My goal is to write code to keep a single HbA1c value per year closest to each participan…
How to Modify Stata Data (Dta file) using python code and save changes back to the dta fileI have 2000 observations and 100 variables in my data from an empirical research project. I am curre…
Combine histogram and connected line graph over timeDear Statalist forum users, I came across this graph in a published paper and want to produce a simi…
Subscribe to:
Post Comments (Atom)
0 Response to Multiple imputation and stsum by groups
Post a Comment