I am looking for the equation for the se.fit values when using logistic regression in R. I have seen this answer - How are the standard errors computed for the fitted values from a logistic regression?

but in my case, I'm calling "predict" function with 'type' parameter set to be "response". In this case, the equation given in the linked I attached doesn't hold.

Here is an example of the predict function I'm calling:

predicted.resutls <- predict(glm.model, train.data, type = "response", se.fit=TRUE)
  • $\begingroup$ You can see all the code underlying an r function by typing the function call at the prompt. $\endgroup$ Aug 10 '14 at 12:04
  • $\begingroup$ thanks gung. I had a look earlier, the function itself is not that easy to understand. Any further information that can help? $\endgroup$
    – user53782
    Aug 10 '14 at 19:08

My understanding is that the Delta Method is used.

Page 50 of http://www.rni.helsinki.fi/~jmh/glm08/R.pdf states this explicitly (see section 3.5). I've no idea how reliable this is!

For more details on the delta method for calculating standard errors of the predicted probabilities in logistic regression, see section 2 of "Using the Delta Method to Construct Confidence Intervals for Predicted Probabilities, Rates, and Discrete Changes" by Jun Xu and J.Scott Long (http://www.indiana.edu/~jslsoc/stata/ci_computations/spost_deltaci.pdf). I'll leave the reader to judge the reliability of the source.

The CAR package provides simple methods for calculating standard errors in this way, if you wanted to compare results.

  • $\begingroup$ The first link is broken unfortunately :( $\endgroup$
    – air
    Feb 17 at 19:23

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.