Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: RE: AIC and BIC in Poisson and GLM


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: AIC and BIC in Poisson and GLM
Date   Tue, 26 Apr 2011 00:37:52 +0100

It's stuff like this that makes me feel surprisingly warm and
affectionate towards R-squared. See, for example, -glmcorr- from SSC
and (more importantly) the paper that inspired it

 Zheng, B. and A. Agresti. 2000. Summarizing the predictive power of a
    generalized linear model. Statistics in Medicine 19: 1771-1781.

The gist of the paper is summarized in the help for -glmcorr-.

Nick

On Mon, Apr 25, 2011 at 11:41 PM, Steven Samuels <sjsamuels@gmail.com> wrote:
> Tony-
>
> From the manual for -glm- (p. 527)
>
>  "There are various definitions of these information criteria (IC) in the literature; glm and estat ic use different definitions. glm bases its computation of the BIC on deviance, whereas estat ic uses the likelihood. Both glm and estat ic use the likelihood to compute the AIC; however, the AIC from estat ic is equal to N, the number of observations, times the AIC from glm. Refer to Methods and formulas in this entry and [R] estat for the references and formulas used by glm and estat, respectively, to compute AIC and BIC. Inferences based on comparison of IC values reported by glm for different GLM models will be equivalent to those based on comparison of IC values reported by estat ic after glm."
>
> Steve
> sjsamuels@gmail.com
>
>
>
> On Apr 25, 2011, at 2:40 PM, Visintainer, Paul wrote:
>
> Peter,
>
> If you compute AIC and BIC using -estat ic- after each model, I think they will be the same.  In the -glm- output, the AIC and BIC are given in blue. If you click on them, it describes the differences between the output estimate and the -estat ic- estimate.
>
> -Paul
>
> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Lachenbruch, Peter
> Sent: Monday, April 25, 2011 12:21 PM
> To: 'statalist@hsphsun2.harvard.edu'
> Subject: st: AIC and BIC in Poisson and GLM
>
> I was developing a simple class example for poisson regression using the poisson command and the glm command.  The log likelihood was the same in both regressions; the coefficients were the same.  When I looked at the AIC and BIC reported by glm I got
>
>                                                  AIC             =  7.920031
> Log likelihood   = -33.60015344                    BIC             =  2.922026
> For the estat command with poisson I got
> . estat ic
>
> -----------------------------------------------------------------------------
>      Model |    Obs    ll(null)   ll(model)     df          AIC         BIC
> -------------+---------------------------------------------------------------
>       full |     10   -495.0676   -33.60015      6     79.20031    81.01582
> -----------------------------------------------------------------------------
>              Note:  N=Obs used in calculating BIC; see [R] BIC note
>
> I would expect these to be the same, but they ain't.  I suspect there may be a normalizing constant lurking around here somewhere.
> I don't want to fix this unless it's truly a bug; but I would like to be able to explain this to my students.
>

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index