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

st: RE: Compute means of coefficients

From   "Kieran McCaul" <>
To   <>
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

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


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  
(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'


Christoph Merkle
PhD Student
*   For searches and help try:

*   For searches and help try:

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