I am trying to calculate the prediction interval for the predicted probability for a new subject using a logistic regression, and I wonder if we can use the same formulas that is used for linear regression and to calculate the predicted interval for the linear predictors and transform it to the probability scale. I tried to do it by hand and I got very wide interval and comparing it with the result obtained from predict function in rms package it was tonally different. Does any one knows how it should be calculated !

  • $\begingroup$ Since the event you will observe is binary, a prediction interval will be rather boring (it will consist either of only ${0}$ or of only ${1}$ if you are very sure of your prediction, or of the pair ${0,1}$ in most cases). You can also calculate a confidence interval for the probability of a new observation - but this is unobservable. $\endgroup$ – Stephan Kolassa Nov 29 '17 at 10:33
  • $\begingroup$ @Stephan What does "unobservable" mean for a confidence interval? I don't understand the distinction you're making. After all, in principle one can check a confidence interval for a probability in much the same way one would check it for any parameter in any model: make a great many more observations until the parameter (whether it might represent a probability, a slope, or anything else) is known to high precision and see whether that value is contained within the original interval. $\endgroup$ – whuber Nov 29 '17 at 17:07
  • $\begingroup$ @whuber: the difference is that a prediction interval aims at containing an actual (future) observable realization x% of the time, and you can actually check whether a given PI contains the observable or not. To calibrate a confidence interval in the way you propose ("until the parameter is known to high precision"), you will always need to assume your model is correct. For a PI, model correctness is not necessary for calibration. Here is Rob Hyndman on the difference: The difference between prediction intervals and confidence intervals. $\endgroup$ – Stephan Kolassa Nov 30 '17 at 0:18
  • $\begingroup$ @Stephan I did not ask about the distinction between prediction and confidence intervals. And of course anything one might say about such an interval is predicated on the model! I was asking about your remark "this is unobservable." I remain just as mystified as before about what you intended that comment to mean. $\endgroup$ – whuber Nov 30 '17 at 3:48
  • $\begingroup$ Ah, I misunderstood - sorry. I was attempting to say that the probability of a new observation to be of class A is unobservable, i.e., the fit of the logistic regression. So you can't calculate a prediction interval for it. You can calculate a confidence interval. Better? $\endgroup$ – Stephan Kolassa Nov 30 '17 at 8:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.