Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: AW: Getting mean of dependent variable from OLS regression using esttab


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: AW: Getting mean of dependent variable from OLS regression using esttab
Date   Fri, 3 Jul 2009 00:22:03 +0200

<> 



*************
sysuse auto, clear
reg pr we rep tr tu
est store est1
reg pr we rep tr tu len head
su pr if e(sample), mean
loc mymean: di %8.2fc r(mean)
esttab est1 ., /* 
 */ addnotes("Mean of dependent variable: `mymean'")
*************



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von David Merriman
Gesendet: Donnerstag, 2. Juli 2009 18:09
An: statalist@hsphsun2.harvard.edu
Betreff: st: Getting mean of dependent variable from OLS regression using
esttab

Is there a way to get the mean of the dependent variable reported using
esttab?

I want to do something like this

reg y1 x1 x2, r
estimates store model1

reg y1 z1 z2, r
estimates store model2

esttab model1 model2

Thanks

-- 
David Merriman
dmerrim@gmail.com
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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