Search
   >> Home >> Resources & support >> FAQs >> Obtaining a standard error of the predicted probability
This FAQ is for Stata 7 and older versions. Beginning in Stata 8, standard errors for predictions can be computed using predictnl.

How do I obtain the standard error of the predicted probability with logistic regression analysis?

Title   Obtaining a standard error of the predicted probability with logistic regression analysis
Author Roberto Gutierrez
Date March 2001

The predicted probability in a logistic regression is a transformation of the linear combination x^t beta. Thus, by the delta method, the predicted probability for

        H(t) = (1+exp(-t))^{-1}

is

        pi = H(x^t beta) = H(linear combination)

Applying the delta method, we get

        se(pi) = H'(linear combination) * stdp 
               = pi*(1-pi)*stdp, 

by properties of the logistic function H().

Thus, to get standard errors for your predicted probabilities, the following sequence of commands will work nicely:

 . logit y x
 . predict p
 . predict stdp, stdp
 . gen se = p * (1-p) * stdp
The Stata Blog: Not Elsewhere Classified Find us on Facebook Follow us on Twitter LinkedIn Google+ Watch us on YouTube