Hi
I'm running survival analyses (mestreg) on Stata using a dataset with 60 imputations to account for missing data.
When I run the command "mi stset time" the software will still take into account the observations with missing data on time from the unimputed dataset (m=0).
In the regression output the number of observations will drop from 4,356 to 3,960 even if I specify that I only want the model to be fitted within the datasets m=1 to m=60.
The code I use is the following:
**** begin code
capture program drop mymestreg
program mymestreg
mestreg c.month i.age i.gender i.ethnicity || site:, distribution(lognormal) time covariance(unstructured)
end
mi stset time
mi estimate, imputations(1/60) saving(miest,replace) eform cmdok: mymestreg
**** end code
Thanks for your help!
I'm running survival analyses (mestreg) on Stata using a dataset with 60 imputations to account for missing data.
When I run the command "mi stset time" the software will still take into account the observations with missing data on time from the unimputed dataset (m=0).
In the regression output the number of observations will drop from 4,356 to 3,960 even if I specify that I only want the model to be fitted within the datasets m=1 to m=60.
The code I use is the following:
**** begin code
capture program drop mymestreg
program mymestreg
mestreg c.month i.age i.gender i.ethnicity || site:, distribution(lognormal) time covariance(unstructured)
end
mi stset time
mi estimate, imputations(1/60) saving(miest,replace) eform cmdok: mymestreg
**** end code
Thanks for your help!
Comment