3
$\begingroup$

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)
$\endgroup$
2
  • $\begingroup$ You can see all the code underlying an r function by typing the function call at the prompt. $\endgroup$ Aug 10, 2014 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, 2014 at 19:08

1 Answer 1

2
$\begingroup$

My understanding is that the Delta Method is used.

Page 50 of this note$^\dagger$ 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. 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.


$\dagger$ NB. The link to the said note is broken.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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