[R] Confidence Intervals for logistic regression

Ben Bolker bbolker at gmail.com
Sat Aug 7 16:43:43 CEST 2010


 <Ted.Harding <at> manchester.ac.uk> writes:

> 
> On 07-Aug-10 09:29:41, Michael Bedward wrote:
> > Thanks for that clarification Peter - much appreciated.
> > 
> > Is there an R function that you'd recommend for calculating
> > more valid CIs ?
> > Michael
> 
> It depends on what you want to mean by "more valid"! If you have
> a 95% CI for the linear predictor (say L(x) at X=x), then the
> probability that the CI will include the true value of L(x)
> is 95% (more or less accurately, depending on what approximation,
> if any, was used to obtain the CI). Thus, if A(Y) and B(Y) are the
> lower and upper limits of a 95% CI for L(x) as functions of the data Y,

  [snip]
 
> So you can't have everything at once, and it depends on what you
> want to mean by "valid"!
 
[snip]

   Yow.  Nothing like r-help on a Saturday morning!
  Practically speaking, I think the previous recommendations (confint() 
and boot.ci()) are probably best.  I prefer equal probabilities
in tails to a symmetric confidence interval. (You could also try
for Bayesian credible intervals, which are symmetric in the probability
cutoff for each side ...)
  The other thing to keep in mind is that once you get down to
this level of rigor, it's extremely likely that the major source
of error/uncertainty in your results will be some other
systematic error or violation of the assumptions. Are your data
*really* distributed the way you think?  Linear on the scale of the
linear predictor, independent, homogeneous probabilities/exchangeability
within groups, ... ?
  Or maybe that's just my excuse for not worrying too much.



More information about the R-help mailing list