Announcement

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

  • Averaging eclass commands across multiple models

    I am working with a data set that has five implicate data sets. For each data set, I am running a regression. After these regressions are finished, I want to average the e() results and then store the averaged result. Below, is an example of what I mean, though I am sure my nomenclature is incorrect:

    reg x y1 y2 y3 if rep = 1
    reg x y1 y2 y3 if rep = 2 ...
    reg x y1 y2 y3 if rep = 5

    gen varz = average(e_y11, e_y12, e_y13, e_y14, e_y15)

    (and then store varz, and display it through estout)

    This is a simplified example of what I am trying to do, but if anyone has suggestions for the above, I can then apply it to my code. Thank you.






  • #2
    Hi Christina,
    I think what you need to do is to look in to the -mi- commands. I havent done this before, but i imagine there is a way to read your data and make State understand it comes from Multiple imputation. THat way, mi estimate:regress, will do what you want.
    HTH
    Fernando

    Comment


    • #3
      Thanks. But for reasons I didn't go into, I am not using multiple imputation.

      Comment


      • #4
        Originally posted by Christina Gibson-Davis View Post
        I am working with a data set that has five implicate data sets. For each data set, I am running a regression. After these regressions are finished, I want to average the e() results and then store the averaged result. Below, is an example of what I mean, though I am sure my nomenclature is incorrect:
        Right, but you mention your data set has 5 implicates. That usually means the multiple imputation has already been done. But you still need to apply the MI rules to pool the results from different regressions.
        I quote from the Stata Manual:
        mi estimate: estimation command runs estimation command on the imputed mi data, and adjusts
        coefficients and standard errors for the variability between imputations according to the combination
        rules by Rubin (1987).

        Otherwise, what i have suggested in the past has been to run standard regressions for the pool data, clustering by individual. This is faster but may understate the true standard errors.

        Comment


        • #5
          I don't know what an "implicate dataset" is, but if you're running -regress- on non-overlapping subsets of your data, I would look into meta-analytical methods to average the results. In particular, look at the -mvmeta- command written di Ian White.

          Code:
          findit mvmeta

          Comment


          • #6
            Thanks for the suggestion.

            Comment

            Working...
            X