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" <[email protected]>
To   <[email protected]>
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: [email protected]
[mailto:[email protected]] Im Auftrag von David Merriman
Gesendet: Donnerstag, 2. Juli 2009 18:09
An: [email protected]
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
[email protected]
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index