[R] logistic regression
Prof Brian Ripley
ripley at stats.ox.ac.uk
Thu Feb 16 14:08:07 CET 2006
On Thu, 16 Feb 2006, Chris Lawrence wrote:
> 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.
It certainly does discuss it as the standard against which the Wald test
falls short, and also discusses examining the profile likelihood.
> 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.)
That's not the point. The Wald test can have very low power in some
practical circumstances. Given that the two are equally easy to do in any
decent piece of software (including R), why not use the one better
supported theoretically and without a known serious flaw?
> 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
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
--
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-help
mailing list