Announcement

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

  • reffects - residuals or predicted probabilities?

    Hi,

    I have been trying to run some model diagnostics on some multilevel logistic models and have been trying to read up on reffects. However, reffects seem to be referred to as both residuals (empirical bayes modal) and predicted probabilities. Is one of these wrong, or can they both be right? Any help greatly appreciated, thank you!

  • #2
    However, reffects seem to be referred to as both residuals (empirical bayes modal) and predicted probabilities.
    My understanding is that what is computed by -predict, reffects- after -melogit- are empirical Bayes modal estimates of the random intercepts. I don't recall seeing them referred to as predicted probabilities. Where did you find that?

    Comment


    • #3
      Hi Clyde, thanks for replying, I had hoped you might!

      It is possible then that I have just misunderstood the terminology used...

      For example here (see link below), where reffects are referred to as the "linear predictor for the random effects". Am I just confusing the word 'predictor' where it may mean something different in different contexts?


      https://stats.idre.ucla.edu/stata/fa...-in-xtmelogit/


      I realise also that I can't actually see now them being referred to as 'predicted probabilities' (meaning I may have made assumptions in error), only when the reffects are added to mu logit values to get the overall predicted log odds as in the picture below.

      Click image for larger version

Name:	multilevel_screenshot_lemma.png
Views:	1
Size:	117.4 KB
ID:	1404335

      Comment


      • #4
        That picture is not easy to see I realise now! Where it says "Add on the random part prediction - replace predlogit = predlogit + u0 + u1*wealthc" where u0 and u1 were generated previously using the reffects command for the random slopes model ( predict u0 u1, reffects)

        Comment


        • #5
          Right. And the u0 and u1*wealthc are being added to predlogit, which is the predicted log odds, not the predicted probability. In fact the command they show immediately before that is -generate predlogit = logit(predprob)-, which brings us back to the log odds metric from the predicted probabilities. So, no, u0 and u1 are not being treated as predicted probabilities at all. They are on the log odds metric, as the random effects should be.

          Comment


          • #6
            So, just to check my understanding, the graph they produce is the predicted log odds of the dependent variable (receiving antenatal care) for communities by wealth.

            If you were instead to use the mu command and plot that against wealth (using pickone as they have), would that then be the predicted probability of receiving antenatal for communities by wealth?

            Comment


            • #7
              If you were instead to use the mu command and plot that against wealth (using pickone as they have), would that then be the predicted probability of receiving antenatal for communities by wealth?
              Yes.

              Comment


              • #8
                Great, thanks Clyde, you have been very helpful

                Comment

                Working...
                X