Re: logit transformation when predictor's a continuous variable

Prof Brian Ripley (ripley@stats.ox.ac.uk)
Fri, 23 Jan 1998 06:16:56 +0000 (GMT)


Frank E Harrell Jr wrote:
>
> Jan,
>
> In doing simulations to study bootstrap error estimates, you should not
> have to deal with any p=0 or p=1, as you use maximum likelihood to
> estimate the regression coefficients and don't actually use the logit
> transformation in the fitting process.

Sorry Frank, but you _may_ have to deal with p = 0 or 1. There's a
phenomenon know as (partial) separation in which the MLE gives
fitted probabilities for some cases of 0 and 1 (and hence some
infinite coefficients). Consider data like:

y y y y

x x x x x

and if you bootstrap you increase the chance of this happening (for
some ratio around 3 of n to p, the number of predictors, the
increase is large by a famous formula of Cover.)

I have always maintained that one should handle such cases separately,
as the standard glm IWLS algorithm `converges' rather slowly. More
details and some follow-up references are in Chapter 3 (esp p.113)
of my PRNN book.

On the original question, glm() does use care.exp() in its calculations,
and essentially takes log(0) as about -30.

Brian

> -----Original Message-----
> From: Jan Muska <jmuska@almaak.usc.edu>
> To: S-news@utstat.toronto.edu <S-news@utstat.toronto.edu>
> Date: Thursday, January 22, 1998 2:29 AM
> Subject: logit transformation when predictor's a continuous variable
>
>
> >I want to do a simmulation study on Efron's prediction error estimators
> >(632 and 632+, and some other ones). One of the decision rules I want to
> >test this on is logistic regression (logit). My problem is I cannot find
> >FORTRAN code to do the logit transformation when the predictor is a
> >continuous variable. I can't even find any reference-just do not know
> >where to look. Does anybody know how to do this transformation
> >log(p/(1-p)) when p=1 or 0?
> >
> >I found a on internet an approximation such as if p=1, then p=1-1/2*n.
> >But this does not seem to provide the same answer as the GLM procedure in
> >S-Plus using the binary link.
> >
> >If you can send me a reference where to look or how to do this
> >transformation, I'll be greatfull. For this is the only think that is
> >keeping me from running the simulation and getting done with my
> >disertation.
> >
> >Thanks, Jan Muska
> >
> >
>
>

-- 
Brian D. Ripley,                  ripley@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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595