The use of -yhat- instead of -yhat2- in the second example is a typo,
of course...
sysuse auto, clear
logit for mpg wei rep78
predict yhat
gen dirk=(yhat-for)/ sqrt(yhat*(1-yhat))
predict e1, dev
predict e2, resid
predict e3, rst
su e1 e3 e2 dirk
logit for mpg
predict yhat2
gen dirkres2=(yhat2-for)/ sqrt(yhat2*(1-yhat2))
predict res2, resid
su res2 dirkres2
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/