Stata: Data Analysis and Statistical Software
   >> Home >> Resources & support >> FAQs >> Obtaining a standard error of the predicted probability

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
Bookmark and Share 
FAQs
What's new?
Statistics
Data management
Graphics
Programming Stata
Mata
Resources
Internet capabilities
Stata for Windows
Stata for Unix
Stata for Mac
Technical support
Like us on Facebook Follow us on Twitter Follow us on LinkedIn Google+ Watch us on YouTube
Follow us
© Copyright 1996–2013 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index   |   View mobile site