[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
Jhilbe@aol.com |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: no log likelihood ratio test after nbreg?? |

Date |
Thu, 10 Mar 2005 16:24:21 EST |

The problem MAY be that the data is Poisson and not overdispersed. I ran a test of Poisson simulated data, showing the fact that there is no extra dispersion (that is why I used GLM rather than POISSON, which does not give you many diagnostics). When I ran the same Poisson data using NBREG the same problems that you mentioned appeared. The run can be found below. Note that you cannot put 0 in as the negative binomial ancillary parameter using GLM. To get close you can do something like fam(nb 0.001). To check if your data is Poisson, run the data using the GLM command and check the dispersion. If it is 0, or very close, it is Poisson and that is likely the source of the problem. If it is greater than 0, then there is another problem. Joe Hilbe . set obs 5000 obs was 0, now 5000 . gen x1=invnorm(uniform()) . gen x2=invnorm(uniform()) . gen xb= 1 + 0.25*x1 - 0.75*x2 . gen mu=exp(mu) mu not found r(111); . gen mu=exp(xb) . rndpoix mu ( Generating .................................................................. ) Variable xp created. . glm mu x1 x2, fam(poi) nolog Generalized linear models No. of obs = 5000 Optimization : ML: Newton-Raphson Residual df = 4997 Scale parameter = 1 Deviance = 4.97544e-11 (1/df) Deviance = 9.96e-15 Pearson = 4.97669e-11 (1/df) Pearson = 9.96e-15 Variance function: V(u) = u [Poisson] Link function : g(u) = ln(u) [Log] Standard errors : OIM Log likelihood = -7317.213353 AIC = 2.928085 BIC = -42560.41438 ------------------------------------------------------------------------------ mu | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- x1 | .25 .0073479 34.02 0.000 .2355984 .2644016 x2 | -.75 .0071323 -105.16 0.000 -.763979 -.736021 _cons | 1 .0093382 107.09 0.000 .9816975 1.018302 ------------------------------------------------------------------------------ . nbreg mu x1 x2, nolog Negative binomial regression Number of obs = 5000 LR chi2(1) = 8688.40 Prob > chi2 = 0.0000 Log likelihood = -7317.2134 Pseudo R2 = 0.3725 ------------------------------------------------------------------------------ mu | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- x1 | .25 .0073479 34.02 0.000 .2355984 .2644016 x2 | -.75 .0071323 -105.16 0.000 -.763979 -.736021 _cons | 1 .0093382 107.09 0.000 .9816975 1.018302 -------------+---------------------------------------------------------------- /lnalpha | -49.44545 . . . -------------+---------------------------------------------------------------- alpha | 3.36e-22 . . . ------------------------------------------------------------------------------ Likelihood-ratio test of alpha=0: chibar2(01) = 0.00 Prob>=chibar2 = 1.000 ============================================= In a message dated 3/10/2005 1:40:51 PM US Mountain Standard Time, wying1@umbc.edu writes: Hi, all, Usually there is a log likelikhood ratio test statistics reported after a negative binominal regression (I ran possion regression first, and then used 'nbreg' regression), and sometimes the Z score for alpha is reported too. But in my case, I didn't see the ratio reported after the regression, and there is no z score for alpha. Then I tried to use 'lrtest' after the model, but it says "lrtest not valid after robust specify force option to perform test anyway". So I put 'force' in option, but it still didn't give me the result. Can anybody tell me what's going on? Ying * * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/ * * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

- Prev by Date:
**st: RE: RE: Converting char to ascii** - Next by Date:
**Re: st: no log likelihood ratio test after nbreg??** - Previous by thread:
**Re: st: no log likelihood ratio test after nbreg??** - Next by thread:
**Re: st: no log likelihood ratio test after nbreg??** - Index(es):

© Copyright 1996–2015 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |