Monday, March 06, 2006

st: RE: areg/xtreg

Did you add in the constant?

. webuse grunfeld,clear

. qui areg invest kstock mvalue, ab(com)

. qui sum kstock

. local ks = r(mean)

. qui sum mvalu

. local mv = r(mean)

. qui sum invest

. local x1 = (_b[kstock]*`ks' + _b[mvalue]*`mv' + _b[_cons])/r(mean)

. disp "`x1'" .999999999999999


> -----Original Message----- > From: [mailto:owner- >] On Behalf Of Terra Curtis > Sent: Monday, March 06, 2006 1:35 PM > To: > Subject: st: areg/xtreg > > I am using Stata 8.2. I have a question regarding what is written in > the Stata manual for -areg-. The manual reports that "-areg- identifies > the model by choosing the intercept that makes the prediction calculated > at the means of the independent variables equal to the mean of the > dependent variable: y(hat)=x(hat)*beta" > > I have used this fact to try to calculate the "percent of mean > explained" by each independent variable in my regression. For > concreteness, I have regressed like this: > > areg depvar indvar1 indvar2 indvar3, absorb(timevar) > > For the percent of mean explained calculation, I have taken each > coefficient multiplied by the mean of that independent variable and > divided by the mean of the dependent variable. After I have done this > for all three independent variables, in theory the three percentages > should add up to 1. However, this is not the case. Can anyone see why > not? > > Thank you, > Terra Curtis

* * For searches and help try: * * *


Links to this post:

Create a Link

<< Home

This page is powered by Blogger. Isn't yours?