Announcement

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

  • Linear regression in multiply-imputed (mi) dataset: residual vs. fitted plot

    Hi,
    I'm trying to get the residual vs. fitted plot after doing linear regression in my "mi" data set but I couldn't make "rvfplot" work. I would greatly appreciate it if anyone could provide some suggestions about how I could get the plot.
    Sincerely
    Musarrat

  • #2
    The reason that -rvfplot- refuses to run after -mi estimate: regress...- is that the concept of a residual-vs-fitted plot is not defined after multiple imputation. Each of the imputed data sets has its own data and results which would correspond to different fitted values and residuals. These statistics do not lend themselves to combining by Rubin's rules, so there is no sensible way to put them all together. In theory, you could actually just separately run -regress- in each data set and then follow that by an -rvfplot- in that data set. But that would get you a multitude of plots, one for each data set, and none of them would really tell you anything about the fit of the combined MI estimates. What you're asking for just doesn't exist. Sorry.

    Comment


    • #3
      I do not completely agree here. Actually, I think there is no problem with obtaining linear predictions in MI datasets (cf. mi predict), so the fitted part seems to be well defined. Whether it is appropriate to combine the residuals is another question. If the assumption of normality holds, then I see no apparent reason why there should be a problem. On the other hand, the reason for looking at such plots is usually precisely to check the assumptions of the model. Obviously it is then hard to justify an assumption needed for a first step to be valid, that you are going to check in the second step on basis of the results before.

      Best
      Daniel
      Last edited by daniel klein; 05 May 2016, 02:52.

      Comment


      • #4
        Thanks to you both! It was so nice of both of you to respond to my request.

        I was not quite sure what was suggested by Mr. Klein, so I only tried Mr. Schechter's suggestions.
        I tried plotting residual vs. fitted plot for each imputed data set as suggested using the following commands but an empty plot emerged! Any clue?
        mi xeq 1: regress cube_milestone team_R_discuss_after
        mi xeq 1: rvfplot, yline(0)

        Reading your emails, it appears that these are not possible to get; in that case, what are other options to verify the model?
        Thanks very much!
        Sincerely
        MN

        Comment


        • #5
          I was not suggesting anything, actually. I just wanted to make the point that what you ask for might not be completely out of question.

          Anyway, to get the single plots, you need to combine the commands into one call to mi xeq

          Code:
          mi xeq : regerss cube_milestone team_R_discuss_after ; rvfplot , yline(0)
          This is documented in the help.

          I do not get the thing about emails. This is a public forum and contacting individual members privately is strongly discouraged (cf.
          FAQ#15). You need to tell us what you mean by "verify the model".

          Best
          Daniel

          Comment


          • #6
            Sorry, Mr. Klein. What I was referring to in my last message was our forum communication, if that was the right way to put it. These are not emails as I understand and I I don't intend to write personal emails.
            Thanks very much for providing the great suggestion! I'll try it.
            Sincerely
            MN

            Comment


            • #7
              Mr. Klein,
              It worked! Thank you so much!!!
              Sincerely
              MN

              Comment

              Working...
              X