Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: L-statistic


From   n j cox <[email protected]>
To   [email protected]
Subject   Re: st: L-statistic
Date   Thu, 24 Apr 2003 09:39:31 +0100

Scott Millis asked

> Collett discusses the L-statistic in "Modelling Binary Data." Is it
> possible to calculate this in Stata?

These statistics, which occur as a set, appear to be the differences between the squares of the likelihood residuals calculated from
two logit models, one of whose terms is a subset of the other's.

So one recipe is something like

glm <model 1>, link(logit) family(binomial)
predict r1, likelihood
glm <model 2>, link(logit) family(binomial)
predict r2, likelihood
gen li = r1^2 - r2^2

where for <model 1> and <model 2> you
must plug in the varlists of the two models.

However, in trying to reproduce the worked
example in Collett's book (1/e; the 2/e I do not have
access to), I find one anomaly. In one case
a likelihood residual is reported by Stata
as missing (I guess wildly that the problem
is a request to take the square root of a negative
number). Collett's results for that case imply
that he replaced such a residual by zero.

Perhaps someone can illuminate this. For
all I know it may be standard practice or justifiable.
The data can be downloaded from David Collett's website
(he works at the University of Reading in the
UK).

*
* 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/




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