Announcement

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

  • how do the melogit and logit handle missing data? why do the results show different # of observations, despite same vars?

    I am trying to understand why two models with the same variables report different number of observations, despite using the same DVs and IVs. Is this due to how the models handle missing data?

    I am running two models. One model is estimated using a mixed-effect logit (command: melogit). The other is estimated using a logit (command: logit). The variables are exactly the same for both models. Can someone help me understand why the melogit output table reports more observations than the logit output table? Thank you.

    Using Stata 15.1.

    Code:
    melogit dv iv1 iv2 iv3 || ccode: , vce(robust) or
    Code:
    logit dv iv1 iv2 iv3, vce(robust) or
    The melogit model reports number of observations: 86,247
    The logit model reports number of observations: 84,921

  • #2
    Please show the complete output of both models. I suspect that somewhere in there, usually just before the header that precedes the regression table, you will find some messages about observations being dropped or variables being omitted that explain it.

    Comment


    • #3
      I found an error in my code that explains the difference. Thank you for the suggestion to check the output again.
      Last edited by Bridget Marchesi; 23 Apr 2019, 14:10.

      Comment


      • #4
        Well, the commands you show here are clearly not the commands that produced these outputs. From the outputs shown I have to say I am stumped. But please post back once more showing the actual commands and the complete response from Stata, including everything and anything between the command itself and the iteration log.

        Comment

        Working...
        X