[Rd] BIC doesn't work for glm(family=binomial()) (PR#8208)

Prof Brian Ripley ripley at stats.ox.ac.uk
Sun Oct 16 10:12:33 CEST 2005


On Sun, 16 Oct 2005, Peter Dalgaard wrote:

> jusung at andrew.cmu.edu writes:
>
>> Full_Name: Ju-Sung Lee
>> Version: 2.2.0
>> OS: Windows XP
>> Submission from: (NULL) (66.93.61.221)
>>
>>
>> BIC() requires the attribute $nobs from the logLik object but the logLik of a
>> glm(formula,family=binomial()) object does not include $nobs.  Adding
>> attr(obj,'nobs') = value, seems to allow BIC() to work.
>>
>> Reproducing the problem:
>> library(nmle);
>> BIC(logLik(glm(1~1,family=binomial())));
>
> It is not clear to me that "nobs" is a well-defined concept for
> arbitrary likelihood functions. In particular, binomial models are
> tricky: Is "13 successes in 79 trials" one (binomial) observation or
> 79 (Bernoulli) ones??
>
> So BIC may not be defined. In which sense is this a bug, anyway? The
> BIC function is defined inside the nlme package which is not designed
> to work with anything but continuous data.

Schwarz originally introduced BIC only for linear regressions (and in 
essentially the random regressors case as I recall).

It is perhaps worth pointing out that 'nobs' (and hence BIC) is not 
well-defined for a linear mixed model either: the appropriate multiplier 
suggested by the theory depends on the type of asymptotics which are 
assumed.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-devel mailing list