Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re: RE: st: xtnbreg - robusteness check and model relevance

From   "Ariel Linden, DrPH" <>
To   <>
Subject   re: RE: st: xtnbreg - robusteness check and model relevance
Date   Wed, 16 Jan 2013 12:17:43 -0500

Hi Simon,

Is there a reason that you must use -xtnbreg- as opposed to -nbreg- ? If you
don't have time-varying covariates, why not use a "straight-up" count
modeling approach with an offset? If you go that route, you can use
-countfit- (part of the spost9_ado package written by Scott Long & Jeremy
Freese (findit -countfit- or - spost9_ado-), to help determine the best
fitting model. 

If you must stay with the longitudinal modeling approach (ie., -xtnbreg- or
-xtpoisson-), you could review the BIC and AIC stats by running -estat ic-.
It's not a panacea, but it is certainly an option.


Date: Tue, 15 Jan 2013 12:15:11 +0000
From: Simon Falck <>
Subject: RE: st: xtnbreg - robusteness check and model relevance

Dear Jay, 

Many thanks for your swift reply, and sorry for my delayed thanks and fuzzy
description of the problem. 

Yes, goodness of fit is the correct description.

In terms of evaluating model relevance, your suggestion of making a
graphical test is also what I had in mind. However, I am not sure what is
the correct approach to derive predicted number of events after -xtnbreg-? 

The convenient -prcounts- command do not work after -xtnbreg-, only standard
count models. 

The instruction for -xtnbreg- postestimation is using -predict-, but it
seems that it is not possible to apply -predict [name], rate- to derive
predicted number of events in a fixed effect model. Nevertheless, it is
possible to derive predicted number of events; assuming fixed effect is
zero, using -predict name, nu0-, but I am not sure if this is the correct

A less preferred solution would be to not to run the empirical model in a
panel, but as a standard negative binomial regression model using -nbreg-,
and then leaving out the fixed effect which may bias the results. 

Any suggestions on what is the correct approach in this situation?

Thanks in advance,

- -----Original Message-----
[] On Behalf Of JVerkuilen
Sent: den 10 januari 2013 15:30
Subject: Re: st: xtnbreg - robusteness check and model relevance

On Thu, Jan 10, 2013 at 5:34 AM, Simon Falck <> wrote:
> Dear Statalist,
> The relevance or precision of a count model seems often to be 
> described in terms of how close the predicted values are to the 
> observed values, usually by comparing the distribution of 
> probabilities of observed and predicted counts. However, from what I 
> understand, it is not possible to use the command -prcounts- after 
> -xtnbreg-, which is used after -nbreg- to derive predicted values. Any 
> suggestions on what is a reasonable strategy in this case?>

I'm not sure what you mean by "robustness test" exactly, but I'll assume you
mean goodness of fit test.
More to the point that approach doesn't actually inform you much about the
difference between NB and Poisson, because NB and Poisson will tend to make
very similar point predictions. Where they will differ is in terms of the
level of uncertainty in the model. In general NB will have wider confidence
intervals than Poisson, sometimes much wider.

So a reasonable graphical test would be to generate predicted values for
important cases and see how often they line up with the corresponding
observed value. There are issues with this approach that I can think of but
it's a start.


*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index