Announcement

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

  • mi estimate and correct number of observations

    Hello forum, I am using mi estimate to run regressions on a set of data for which I created 10 imputed data sets. The original data set is about 3,000 observations (depends which vars are included in the reg) with the imputed data sets it was closer to 30,000. I ran several models with the mi estimate command and could see that the number of observations were what I'd expect close to 30,000. However, over the last week after cleaning a new variable to be included in the regression when I run the mi estimate command I get observations that are closer to 1600, even less than those in the original data set. I can't figure out what I've done to the data set.

    Here are the commands I'm using:
    mi xtset pid
    mi estimate, dots post: xtlogit mifias2 depscore stress socialsupp i.gestpp i.status i.groupwealthq i.groupsite if oddvisit==1 | visit==8 , re
    outreg2 using stagmodelspm.doc, word replace label pvalue eform ctitle("FI & Psycho gestapp")


    I have checked to see that each variable was imputed and the total observations for each variable are as I expect. I have tried to run a shorten regression with just two variables at a time to see if I can pin point which variable was making noise but I get the same result no matter the combination.

    Attached is a screen shot o the total observations used in the regression.

    Any advice on how to troubleshoot this?
    Thanks
    Gloria
    Attached Files

  • #2
    Gloria:
    posting screenshots does not make replying easier (as per FAQ).
    That said, are you sure that, in your last Stata session you did not add some -if- clause in excess?
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Thank you for the suggestion, I removed the if statement and still have the same issue.

      Comment


      • #4
        Gloria:
        did Stata throw error/warning messages during the last -mi- session?
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Carlo: It did not generate error or warning messages.

          Comment


          • #6
            Gloria:
            then I would compare the variable you cleaned and see if something got different after cleaning.
            Kind regards,
            Carlo
            (Stata 19.0)

            Comment


            • #7
              Thanks I've checked that. The observations are correct for the cleaned var. I tried running the xtlogit command without the mi estimate and the observations also are correct.

              Comment


              • #8
                Hi Carlo, I went back and reread the Stata multiple imputation manual and wonder if what I am seeing in my mi estimate results is the following: when you use the mi command you create imputation sets, in my case 10, and run a regression the output is an average of the imputed data sets and the original data set. So does this mean that the total observations I should expect to see included with the mi estimate is not the total number of observations created by the 10 data sets but the average?

                Comment


                • #9
                  Gloria:
                  the number of observations reported after the -mi estimate:- command is not the total number of observations created by the 10 data sets, but the the number of complete observations of your original datasets + those that were imputed.
                  Kind regards,
                  Carlo
                  (Stata 19.0)

                  Comment

                  Working...
                  X