Stata
Products Purchase Support Company
Search
   >> 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
FAQs
What's new?
Statistics
Data management
Graphics
Programming Stata
Mata
Resources
Internet capabilities
Stata for Windows
Stata for Unix
Stata for Macintosh
Technical support
Resources & support
FAQs
Technical support
NetCourses
Short courses
Users Group meetings
Statalist
Links
Software updates
Software archives
Customer service
Manuals & supplements
Stata Journal
STB
Stata News
Stata Automation
Plugins

Site overview
Products
Resources & support
Company
Site index

© Copyright 1996–2008 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index