Statalist


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

st: RE: Compute means of coefficients


From   "Kieran McCaul" <[email protected]>
To   <[email protected]>
Subject   st: RE: Compute means of coefficients
Date   Fri, 8 Aug 2008 06:31:03 +0800

If you want to capture the regression coefficients and then calculate
their mean, which is what your question seems to imply, then this would
do that.


statsby bY_A=_b[Y_A] bV_A=_b[V_A] bDD=_b[DD] bD_BE=[D_BE], by(year)
saving(filename.dta, replace): reg Y_A V_A DD D_BE

use filename.dta, clear
summ bY_A bV_A bDD bD_BE



______________________________________________
Kieran McCaul MPH PhD
WA Centre for Health & Ageing (M573)
University of Western Australia
Level 6, Ainslie House
48 Murray St
Perth 6000
Phone: (08) 9224-2140
Phone: -61-8-9224-2140
email: [email protected]
http://myprofile.cos.com/mccaul 
_______________________________________________


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Christoph
Merkle
Sent: Friday, 8 August 2008 6:05 AM
To: [email protected]
Subject: st: Compute means of coefficients

Hi,

I'm using the code below for year-by-year regressions in a panel. Is  
there some possibility to calculate the means of the regression  
coefficients conveniently in STATA? And also the t-statistics for the  
means?
(Would that mean to create a variable from the coefficients first or  
is there a direct approach?)

forvalues year = 1964/1996 {
       reg Y_A V_A DD D_BE if year == `year'
}

Thanks

Christoph Merkle
PhD Student
*
*   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