Announcement

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

  • Multiple imputation question - trying to account for missing values of five visit variables that are totalled

    Dear STATA forum,

    I have a dataset that looks at whether participants showed up to a visit (yes/no) of which there are 5 visits. I want to know the total number of visits they showed up to and use that totaled variable in Poisson regression. Several of the visits have missing values, and when I add up a participant's visits with missing values, it will result in a missing value. I am struggling with how to apply multiple imputation in this context.

    For example, the first 10 rows are shown below corresponding to whether they showed at visits 1 - 5:

    Click image for larger version

Name:	Screen Shot 2023-04-11 at 7.54.35 AM.png
Views:	1
Size:	13.9 KB
ID:	1709360


    I began with the following code:

    mi set mlong
    mi register imputed visit1 visit2 visit3 visit4 visit5
    mi misstable summarize visit1 visit2 visit3 visit4 visit5
    mi impute logit visit1 covariate_x covariate_y covariate_z, add(10) rseed(1234)
    mi impute logit visit2 covariate_x covariate_y covariate_z, add(10) rseed(1234)
    mi impute logit visit3 covariate_x covariate_y covariate_z, add(10) rseed(1234)
    mi impute logit visit4 covariate_x covariate_y covariate_z, add(10) rseed(1234)
    mi impute logit visit5 covariate_x covariate_y covariate_z, add(10) rseed(1234)


    This results in 50 imputations and I see, at this point, there are still several (hundreds of) missing values:

    mdesc visit1 visit2

    I ultimately want to total the visits and use this variable in my regression model:

    gen VisitsAttended = visit1 visit2 visit3 visit4 visit5
    glm VisitsAttended varX varY varZ, family(poisson) link(log) eform


    Would you total up the visits after performing multiple imputation on each of the visits (as I did)? or is there a more appropriate method to deal with missing values in this scenario?

    I really appreciate your thoughts! I am a newbie with MI so apologize if this is basic.
Working...
X