Announcement

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

  • xtlogit and melogit - why is one called a mixed effect and one called a random effect model?

    I am trying to better understand when to use a fixed effects model and when to use a random effect model for panel data. I am a bit confused on the difference between xtlogit with re and melogit. Guides online seem to suggest that they produce the same result: here and here. And for example, they said the following:

    "The xtlogit and melogit results are identical other than some very slight differences caused by using different algorithms. Both differ somewhat from the logit results, which ignore the multilevel nature of the data. Among other things the multilevel model results show that having a spouse and working more hours tend to reduce the likelihood of being in poverty, while having a child or being black tend to increase the likelihood."

    However, xtlogit (per their documentation) produces a fixed or random effects model, and melogit produces a mixed effects model. Can someone help clarify this? Thanks!

  • #2
    Yes, the terminology is a bit confusing and inconsistent.

    -xtlogit- is actually three different commands: -xtlogit, fe-, -xtlogit, re-, and -xtlogit, pa-. The first is a conditional fixed effects model, the last is a population-averaged model, and -xtlogit, re- is called a random effects model. (If you don't specify any of -fe-, -re-, or -pa-, you get -re- by default.)

    -melogit- is a more general command than -xtlogit, re-. -xtlogit, re- is restricted to models with two levels, whereas -melogit- can accommodate any number of levels. -xtlogit, re- cannot accommodate random slopes (aka cross-level interactions) whereas -melogit- can. It is fair to say that anything -xtlogit, re- can do, -melogit- can also do--the reverse is not true. So why does anyone use -xtlogit, re-? Well, as it has less flexibility it is, accordingly, simpler to use as fewer things have to be specified in the command. Also, because its domain of application is more restricted, -xtlogit, re- usually runs faster. It also runs faster because it uses a different algorithm to calculate the coefficients and standard errors.

    None of which answers your question "why is one called a mixed effect and one called a random effect model?" Since the models that can be estimated with these commands include both random and non-random effects (aka fixed effects--but be careful because the term fixed-effects itself has several different meanings), it would be more accurate to refer to both of them as mixed-effects models. There aren't any commands I know of that estimate only models with only random effects. I think that the inconsistent terminology is deeply entrenched in usage at this time, and we just have to live with that, even though it really doesn't make sense.

    Bottom line: if you have a two-level model with random intercepts but no random slopes, you can use either -xtlogit, re- or -melogit-. You will get the same answers with both, except for possibly very small discrepancies in far-off decimal places. -xtlogit, re- will probably run more quickly, and coding it is simpler. The different terminology has no rational explanation.
    Last edited by Clyde Schechter; 08 Mar 2022, 13:36.

    Comment


    • #3
      This was a helpful reply Clyde, thankyou for comparing -xtlogit- and -melogit-.

      I wonder if you could expand on the topic (or point to a discussion) of the various meanings of "fixed-effects" (and "random-effects")? Perhaps I should start a new thread on this topic, but the question follows neatly from the point you raise in #2.

      For example, in meta-analysis, is a different type of fixed-effects meant when studies are combined on the assumption that the studies estimate a common population parameter? Similarly, is a different type of random-effects meant when studies are combined but not grouped on the basis of some variable (as in mixed regression), but rather are allowed to differ on the assumption that there is underlying clinical and biological heterogeneity between studies?

      Comment

      Working...
      X