Announcement

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

  • Xtlogit, fe versus xtreg, fe on binary categorical outcome, changes in sample size

    Hi Stata Forum,

    I have a panel data in long format, with about 40 000 individuals. The panel is unbalanced, there are some people that appear in all waves and others that only appear once or twice. I have 3 waves. The outcome variable is binary and categorical. My main goal is to show the different estimates with the two models: xtreg, fe and xtlogit, fe. I understand the issues with LPM and the fixed effects model, therefore I already know that xtreg will be biased (I do it for educational reasons).

    Anyhow, when I run xtreg, fe the sample reduces from 40.000 to 20.000 individuals (those where the ones with within variation), whereas the xtlogit, fe does not use the primary 40 thousand individuals for the analysis, it actually uses 8,000 out of the whole sample and then it reduces to 3000 people.

    Why does this happen ?

    Is it because the xtlogit, fe is more exact and thus just uses the people that are repeated in all 3 waves? Does the xtreg, fe uses individuals that appear in 2 and 3 waves as a mix?

    thank you

  • #2
    Seeing the actual output could help. My guess is that xtlogit, fe is giving you messages like

    note: 324 groups (1,620 obs) dropped because of all positive or all negative outcomes.
    xtlogit, fe drops cases with no within-group variation while xtreg, fe keeps them.

    For more, see

    https://www3.nd.edu/~rwilliam/Taiwan...xedEffects.pdf
    -------------------------------------------
    Richard Williams, Notre Dame Dept of Sociology
    Stata Version: 17.0 MP (2 processor)

    EMAIL: [email protected]
    WWW: https://www3.nd.edu/~rwilliam

    Comment


    • #3
      That is the exact message! Thank you for the clarification.

      Comment

      Working...
      X