Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Simon Falck <simon.falck@abe.kth.se> |
To | "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |
Subject | RE: st: Poisson and Negbin models |
Date | Mon, 29 Oct 2012 10:02:33 +0000 |
Thanks Maarten. I have only used the tests to explore the distribution of the data, and see your point of them not being relevant. I have downloaded your "berlin12 example" on comparing distributions. Strangely, the -margdistfit- did not to work after any count model. I got this error message after -poisson-: . margdistfit, hangroot(susp notheor jitter(2)) name(poisson) margdistfit cannot be used after poisson I tried the other models (non count), for which -margdistfit- worked well. Can you think of why I cannot use -margdistfit- after count models? Is it because I am using Stata v. 11.2, and would need Stata 12.x? /Simon -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Maarten Buis Sent: den 29 oktober 2012 10:17 To: statalist@hsphsun2.harvard.edu Subject: Re: st: Poisson and Negbin models > The first indication is it that Y is overdispersed as the mean and the variance is not equal, nor close being equal (mean 4.347222 < var 542.6806). A formal Goodness-of-fit test of Y alone, using estat gof- after -poisson $y-, indicates Y is significantly different from a Poisson distribution (chi2 = 1726.882, Prob > chi2(71) = 0.0000). Similarly the LR test of alpha related to the output from -nbreg $y- indicates that the negbin model is preferred over the Poisson (LR=0: chibar2(01) = 1570.16 Prob>=chibar2 = 0.000). Those are not appropriate tests as you would not expect the marginal distribution of y to Poisson or negative binomially distribution, otherwise you would not have added the explanatory variables later on... See e.g. <http://www.maartenbuis.nl/presentations/berlin12.html> > When I run the model Y=X1 X2...Xn, using the -nbreg- command, I end up with some problems. The model outcome indicates some problem with the alpha, and a LR test indicating that the Poission is preferred over the negbin model: <snip> > -------------+-------------------------------------------------------- > -------------+-------- > /lnalpha | -18.90698 558.4214 113.393 1075.579 > -------------+-------------------------------------------------------- > -------------+-------- > alpha | 6.15e-09 3.43e-06 0 . > ---------------------------------------------------------------------- > -------- I would appreciate if someone could explain what seems to be > the problem(s) here, and some indication on the problem related to the alpha in the negbin model. A Poisson model is a negative binomial model with an alpha of 0. In your case the alpha is 0.000000000615 (if I counted the 0s correctly). So to all intends and purposes you estimated a Poisson model with -nbreg-. -- Maarten --------------------------------- Maarten L. Buis WZB Reichpietschufer 50 10785 Berlin Germany http://www.maartenbuis.nl --------------------------------- * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/ * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/