[R] logistic regression

Chris Lawrence chris at lordsutch.com
Thu Feb 16 08:55:01 CET 2006


On 2/16/06, Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote:
> On Thu, 16 Feb 2006, Chris Lawrence wrote:
>
> > On 2/15/06, Taka Matzmoto <sell_mirage_ne at hotmail.com> wrote:
> >> I have two bianry variables (X and Y) and one continuous variable (Z).
> >>
> >> I like to know, after controlling for the continuous variable, where one of
> >> the binary is significantly related to the other binary variable using
> >> logistic regression
> >>
> >> model <- glm(Y ~ X + Z, family=binomial)
> >>
> >> Is checking the significance of the coefficient of X  a proper way for doing
> >> that ?
> >
> > Yes, that will do it.
>
> Sorry, not so.  That is a Wald test, and its power goes to zero as the
> true effect increases.  You need to do a likelihood ratio test via
> anova() to get a reasonable test.

MASS, 3rd edition - p. 225-26.  (I haven't collected my pennies yet
for MASS 4.)  Incidentally, at least the 3rd ed. doesn't suggest doing
the LR test as an alternative to relying on the Wald chi-square test
or z/t test.

For what it's worth, Long's Regression Models for Categorical and
Limited Dependent Variables (1997, p. 97) disagrees in terms of the
practical significance of Hauck and Donner's result (sorry, no JASA
access from home to check):

"In general, it is unclear whether one test is to be preferred to the
other [e.g., Wald or LR].  Rothenberg (1984) suggests that neither
test is uniformly superior, while Hauck and Donner (1977) suggest that
the Wald test is less powerful than the LR test.  In practice, the
choice of which test to use is often determined by convenience." 
(Long then goes on to discuss the need to estimate nested models for
the LR test, versus the need to do matrix algebra to calculate the
Wald test, as an illustration of the contrast in convenience.)

Rothenberg (1984) is in Econometrika vol 52, pp. 827-42, according to
Long's bibliography, for anyone fascinated enough by this question to
go digging.

Off to bed...


Chris




More information about the R-help mailing list