[R] confint function in MASS package for logistic regression analysis

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Jan 18 18:55:25 CET 2012


Yes, the results from confint() are much more accurate than yours and 
SPSS's.  (As Bill Venables once said in a similar circumstance: this is 
not the place to report bugs in SPSS.)

Hint: the word 'profile' appears all over the place on the help pages. 
confint() uses profile likelihood methods.  These are particularly 
appropriate[*] for logistic regression, as explained in the book for 
which this is support software, so you will need to get hold of it.

[*] Rather, what you style 'usual' methods are particularly inappropriate.

On 18/01/2012 15:27, Jerome Myers wrote:
> I have the following binary data set:
>                       Sex
> Response      0   1
>                  0 159 162
>                  1   4     37
>    My commands
>        library(MASS)
>           sib.glm=glm(sib~sex,family=binomial,data=sib.data)
>          summary(sib.glm)
> The coefficients in the output are
>               Estimate Std. Error z value Pr(>|z|)
>       (Intercept)  -3.6826     0.5062  -7.274 3.48e-13 ***
>            sex           2.2059     0.5380   4.100 4.13e-05 ***
> I have calculated the .95 confidencce interval for sex two ways:
>       (1) confint(sib.glm)   The result is
>                   2.5 %    97.5 %
> (Intercept) -4.861153 -2.823206
> sex          1.263976  3.428764
>
> Using the usual confidence interval formula,
>       (2) 2.2059 +/- 1.96*.538 = 1.15142.  3.26038
> The results from (2) are identical to those from SPSS but do not agree
> with those from the confint function.
>
>       I have reviewed the MASS pdf file and, seeing no solution there,
> have tried to get the Venables&  Ripley book from the local college
> libraries but the only copies are out on loan. I suspect there is a
> simple explanation of the discrepancy, perhaps a modification to account
> for pre-asymptotic distribution. Or perhaps I misunderstand the
> application of the confint fuuction in the MASS package. If someone
> knows the explanation, I'd appreciate it.
>


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