# Re: st: RE: areg/xtreg

 From Terra Curtis To statalist@hsphsun2.harvard.edu Subject Re: st: RE: areg/xtreg Date Mon, 06 Mar 2006 15:52:56 -0500

Yes, I did try that. I took the constant into account by subtracting from the dependent variable average. So, I had three ratios:
(1) [coef1*indvar1(avg) ] / (depvar(avg)-const)
(2) [coef2*indvar2(avg) ] / (depvar(avg)-const)
(3) [coef3*indvar3(avg) ] / (depvar(avg)-const)

It is my understanding that these three ratios should add to 1. However, the calculation of coefficients times means plus constant (as you have specified as x1 below) does not produce a value which is equal to the mean of my dependent variable.

Scott Merryman wrote:

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

Scott

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-
statalist@hsphsun2.harvard.edu] On Behalf Of Terra Curtis
Sent: Monday, March 06, 2006 1:35 PM
To: statalist@hsphsun2.harvard.edu
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:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/

```*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
```