Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Write output to file


From   "Austin Nichols" <[email protected]>
To   [email protected]
Subject   Re: st: Write output to file
Date   Fri, 4 May 2007 11:19:09 -0400

Hendri --
I think Dirk means -ssc install- which works for -estout- and -outreg-
and -outreg2- among other options (I like -estout- myself).  I believe
Dirk intends you to compute one of the residuals possible after
-logit-, all of which are described in -help logit postestimation-,
but you are better off using the -resid- option if that's what you
want.  You can see where Stata keeps the estimates by typing -eret li-
after an estimation command, and you can use them in various ways with
-matrix- commands. Ex:

sysuse auto, clear
logit for mpg wei rep78
eret li
mat li e(b)
mat li e(V)
predict yhat
gen dirk=(yhat-for)/ sqrt(yhat*(1-yhat))
predict e1, dev
predict e2, resid
predict e3, rst
su e1 e3 e2 dirk

But note:

logit for mpg
predict yhat2
gen dirk2=(yhat-for)/ sqrt(yhat*(1-yhat))
predict r2, resid
su r2 dirk2

On 04 May 2007 15:49:32 +0100, Dirk Nachbar <[email protected]> wrote:
I think you can install within Stata with
net install outreg

I don't think it does store the variance, use this

logit y x
predict yhat
gen res=(yhat-y)/ sqrt(yhat(1-yhat))
sum res


The opposite of a correct statement is a false statement. But the opposite of a profound truth may well be another profound truth.
*
*   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index