Announcement

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

  • Negative binomial vs. Quasi-maximum likelihood (xtnbreg vs. xtdpdqml)

    Hi all,

    I am running regressions where the dependent variable is count variable (positive integer). The data structure is panel.

    I first used negative binomial regression (xtnbreg command in stata). I then tried quasi-maximum likelihood estimation (xtdpdqml command in stata).
    However, the number of observations included in the regressions significantly drops when I use xtdpdqml (compared to when I use xtnbreg).

    When I set panel and time variable (xtset), stata says that
    panel variable: ID (unbalanced)
    time variable: year, 1960 to 2010, but with gaps
    delta: 1 unit

    In xtnbreg,
    the notes from the results are
    note: 198 groups (198 jobs) dropped because of only one ops per group
    note: 288 groups (1478 jobs) dropped because of all zero outcomes

    Number of obs = 2,636
    Number of groups = 263

    In xtdpdqml,
    the note from the results is
    note: 244 groups are dropped due to gaps or insufficient number of observations

    Number of obs = 1,891
    Number of groups = 266



    How can the number of observations (and number of groups) for xtnbreg and xtdpdqml different?

    Thanks for the help in advance.

  • #2
    By default, xtdpdqml estimates the model in first differences. By first differencing the data, you are losing one observation per group. The presence of the lagged dependent variable reduces the number of observations by another one per group. On top of that, it requires that there are at least 3 observations per group due to the dynamic nature of the estimated model. This is probably why 244 instead of just 198 groups are dropped due to insufficient observations. As an aside, note that xtdpdqml estimates a linear model.
    https://www.kripfganz.de/stata/

    Comment

    Working...
    X