<p>I'm a little baffled by your question. I've made a simple simulation, data attached:</p>
<pre><code>sum x1  x2  x3  x1_proportion   x2_proportion   x3_proportion   ones
1.44975 .884738 .331214 .233797 .6102698    .2284629    .1612673    1
1.75989 .793748 .655205 .310937 .4510212    .3722992    .1766796    1
1.35571 .462276 .882351 .011085 .3409837    .6508396    .0081768    1
1.63689 .002848 .708656 .925386 .0017398    .4329283    .565332     1
1.44575 .862857 .256457 .326439 .5968218    .1773864    .2257918    1
2.10639 .59055  .964992 .550847 .2803613    .4581261    .2615126    1
1.34527 .180885 .497332 .667048 .1344604    .3696907    .4958489    1
1.97426 .299043 .831939 .843283 .1514706    .4213918    .4271376    1
1.7669  .559657 .268161 .939079 .3167457    .1517697    .5314847    1
1.58345 .916163 .520577 .146706 .5785881    .3287623    .0926496    1
1.77596 .832321 .670544 .273091 .4686608    .3775677    .1537714    1
1.89561 .779795 .756137 .359681 .4113679    .398888     .1897441    1
.784696 .000545 .63612  .148031 .0006939    .810658     .1886481    1
1.63006 .25147  .58731  .791278 .1542705    .3603002    .4854293    1
1.8412  .526846 .327903 .986448 .2861431    .1780925    .5357644    1
1.52932 .627659 .802862 .098797 .4104179    .5249804    .0646017    1
</code></pre>
<p>Then in Stata (or whatever you want)</p>
<blockquote>
<p>reg sum x1 x2 x3</p>
</blockquote>
<p>obtains 1's for all <span class="math-container">$\beta$</span>'s like anticipated and rounding error to 0 for the constant. <span class="math-container">$R^2$</span>'s are all 1. But</p>
<blockquote>
<p>reg ones x1_proportion x2_proportion x3_proportion, noconst</p>
</blockquote>
<p>Obtains, again, all <span class="math-container">$\beta$</span>s are 1.  And if you allow the constant, you will get simply 1 for the constant and 0 for all <span class="math-container">$\beta$</span>s. In either case, again, <span class="math-container">$R^2$</span>'s are all 1.</p>
<p>I think you have some confusion about the meaning of regression (or I am not understanding the question) here, so I will dig deeper and speculate a bit. I think you actually want:</p>
<p><a href="https://i.sstatic.net/CVHwV.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/CVHwV.png" alt="enter image description here" /></a></p>
<p>... That x1 represents, on average 32.4% of the &quot;sum&quot; variable, with a standard deviation of 19.6%</p>

CC BY-SA 4.0
2021-07-05T21:40:47.070Z
The question was- the relationship between these mean variables, and the partial R2 of each of these regressors. In other words, how is the 0.324 in row 1 related to a regression of y on x1(tilde), where x1(tilde) represents the residual of an auxiliary regression of x1 on x2 and x2 (i.e. orthogonalized x1)
ChinG
CC BY-SA 4.0
2021-07-05T23:31:48.450Z
^ the R2 obtained by a regression of y on x(tilde)
ChinG
CC BY-SA 4.0
2021-07-06T19:56:10.690Z
@RegressForward: how do you even obtain an $R^2$ in your regression of "ones" over the rest, with "ones" having zero variation?
BrsG
CC BY-SA 4.0
2021-07-06T20:40:40.400Z
Might be a short cut in Stata that when the numerator is the same size as the denominator it returns 1, even if the denominator is 0.
RegressForward
CC BY-SA 4.0
2021-07-07T18:52:00.830Z
@RegressForward The regression would just be the regression of Y on C, I, G and X-M. Notice that we would get a coefficient of 1, as you indicated. What I am comparing is not a regression of 1 on the contribution of each of the components C, I, G and X-M, but rather, the average contribution of say, C to Y (hence E[C/Y] across observations), to the partial R2 obtained by a regression of Y on C (or the R2 of Y on C, when C and other components are independent).
ChinG
CC BY-SA 4.0
2021-07-05T18:35:49.477Z
2021-07-05T19:25:16.437Z
2021-07-05T19:25:16.437Z
RegressForward
<p>I asked a similar question on Cross Validated, but got no answer. The following question is sufficiently different.</p>

<p>Consider the following deterministic relationship:$$Y_{t}=C_{t}+I_{t}+G_{t}+(X_{t}-M_{t})$$</p>

<p>If we run an OLS regression of Y
  on the covariates, of course, we get an $R^{2}$
 of 1, and the vector of coefficients equal to their population counterparts, i.e. $$\hat{\beta}=
 \beta=1$$</p>

<p>Now, this means the marginal effect of each regressor is constant. However, the contribution of each regressor depends on its relative variance to y.
  In fact, in the univariate case, it can be shown that:$$R^{2}=\beta^{2}\frac{var(x)}{var(y)}$$
 which shows that even when the marginal effect of $x$
  on $y$
  is large, its contribution in the partial $R^{2}$
 sense is high only when it varies a lot, causing y
  to vary with it as well. </p>

<p>Now, consider the same above expression:$$Y_{t}=C_{t}+I_{t}+G_{t}+(X_{t}-M_{t})$$</p>

<p>Let us divide both sides by $Y_{t}$
  for the entire vector of coefficients and the design matrix.</p>

<p>We get:$$1=\frac{C_{t}}{Y_{t}}+\frac{I_{t}}{Y_{t}}+\frac{G_{t}}{Y_{t}}+\frac{(X_{t}-M_{t})}{Y_{t}}$$</p>

<p>This holds for each realization of $Y_{t}$
 and the design matrix by construction. Now, each regressor here is the relative contribution (which we can multiply by 100 to get percentage contribution) to the dependent variable. </p>

<p>Now that we have the relative contribution for each regressor for each observation, we can get the mean contribution of the regressor across observations.</p>

<p>I ran some simulations, and found that the mean contribution of each regressor is close, but not exactly equal to the partial $R^{2}$
  of each regressor. Is there any relationship between them? Intuitively, they should be the same, right? Thanks a lot!</p>

CC BY-SA 3.0
2016-01-28T08:27:25.547Z
I think this question would be more appropriate if posted in cross-validated.
Fuca26
CC BY-SA 4.0
2021-07-05T14:33:34.730Z
I don't see how you can get a partial $R^2$ less than one for your fully deterministic model. See also the first answer in [this post](https://stats.stackexchange.com/questions/155497/should-partial-r2-add-up-to-total-r2-in-multiple-regression).
tdm
CC BY-SA 4.0
2021-07-05T23:32:30.380Z
The question is less about what the definition of a partial R2 is, and more about the relationship between Partial R2 and percentage contribution (deterministic or not)
ChinG
<statistics><regression>
Partial R2 and contribution of Regressors
ChinG
# Partial R2 and contribution of Regressors

(Asked by: username_0 on 2016-01-21)

I asked a similar question on Cross Validated, but got no answer. The following question is sufficiently different.

Consider the following deterministic relationship:$$Y\_{t}=C\_{t}+I\_{t}+G\_{t}+(X\_{t}-M\_{t})$$

If we run an OLS regression of Y
on the covariates, of course, we get an $R^{2}$
of 1, and the vector of coefficients equal to their population counterparts, i.e. $$\hat{\beta}=
\beta=1$$

Now, this means the marginal effect of each regressor is constant. However, the contribution of each regressor depends on its relative variance to y.
In fact, in the univariate case, it can be shown that:$$R^{2}=\beta^{2}\frac{var(x)}{var(y)}$$
which shows that even when the marginal effect of $x$
on $y$
is large, its contribution in the partial $R^{2}$
sense is high only when it varies a lot, causing y
to vary with it as well.

Now, consider the same above expression:$$Y\_{t}=C\_{t}+I\_{t}+G\_{t}+(X\_{t}-M\_{t})$$

Let us divide both sides by $Y\_{t}$
for the entire vector of coefficients and the design matrix.

We get:$$1=\frac{C\_{t}}{Y\_{t}}+\frac{I\_{t}}{Y\_{t}}+\frac{G\_{t}}{Y\_{t}}+\frac{(X\_{t}-M\_{t})}{Y\_{t}}$$

This holds for each realization of $Y\_{t}$
and the design matrix by construction. Now, each regressor here is the relative contribution (which we can multiply by 100 to get percentage contribution) to the dependent variable.

Now that we have the relative contribution for each regressor for each observation, we can get the mean contribution of the regressor across observations.

I ran some simulations, and found that the mean contribution of each regressor is close, but not exactly equal to the partial $R^{2}$
of each regressor. Is there any relationship between them? Intuitively, they should be the same, right? Thanks a lot!

**Tags:** statistics, regression

> **Comments:**
> **username_1**: I think this question would be more appropriate if posted in cross-validated.  
> **username_2**: I don't see how you can get a partial $R^2$ less than one for your fully deterministic model. See also the first answer in [this post](https://stats.stackexchange.com/questions/155497/should-partial-r2-add-up-to-total-r2-in-multiple-regression).  
> **username_0**: The question is less about what the definition of a partial R2 is, and more about the relationship between Partial R2 and percentage contribution (deterministic or not)  

---

## 1 answers

### Answer by username_3 on 2021-07-05. Score: 4

I'm a little baffled by your question. I've made a simple simulation, data attached:
sum x1  x2  x3  x1_proportion   x2_proportion   x3_proportion   ones
1.44975 .884738 .331214 .233797 .6102698    .2284629    .1612673    1
1.75989 .793748 .655205 .310937 .4510212    .3722992    .1766796    1
1.35571 .462276 .882351 .011085 .3409837    .6508396    .0081768    1
1.63689 .002848 .708656 .925386 .0017398    .4329283    .565332     1
1.44575 .862857 .256457 .326439 .5968218    .1773864    .2257918    1
2.10639 .59055  .964992 .550847 .2803613    .4581261    .2615126    1
1.34527 .180885 .497332 .667048 .1344604    .3696907    .4958489    1
1.97426 .299043 .831939 .843283 .1514706    .4213918    .4271376    1
1.7669  .559657 .268161 .939079 .3167457    .1517697    .5314847    1
1.58345 .916163 .520577 .146706 .5785881    .3287623    .0926496    1
1.77596 .832321 .670544 .273091 .4686608    .3775677    .1537714    1
1.89561 .779795 .756137 .359681 .4113679    .398888     .1897441    1
.784696 .000545 .63612  .148031 .0006939    .810658     .1886481    1
1.63006 .25147  .58731  .791278 .1542705    .3603002    .4854293    1
1.8412  .526846 .327903 .986448 .2861431    .1780925    .5357644    1
1.52932 .627659 .802862 .098797 .4104179    .5249804    .0646017    1

Then in Stata (or whatever you want)

reg sum x1 x2 x3

obtains 1's for all $\beta$'s like anticipated and rounding error to 0 for the constant. $R^2$'s are all 1. But

reg ones x1_proportion x2_proportion x3_proportion, noconst

Obtains, again, all $\beta$s are 1.  And if you allow the constant, you will get simply 1 for the constant and 0 for all $\beta$s. In either case, again, $R^2$'s are all 1.
I think you have some confusion about the meaning of regression (or I am not understanding the question) here, so I will dig deeper and speculate a bit. I think you actually want:

... That x1 represents, on average 32.4% of the "sum" variable, with a standard deviation of 19.6%

> **Comments:**
> **username_0**: The question was- the relationship between these mean variables, and the partial R2 of each of these regressors. In other words, how is the 0.324 in row 1 related to a regression of y on x1(tilde), where x1(tilde) represents the residual of an auxiliary regression of x1 on x2 and x2 (i.e. orthogonalized x1)  
> **username_0**: ^ the R2 obtained by a regression of y on x(tilde)  
> **username_4**: @username_3: how do you even obtain an $R^2$ in your regression of "ones" over the rest, with "ones" having zero variation?  
> **username_3**: Might be a short cut in Stata that when the numerator is the same size as the denominator it returns 1, even if the denominator is 0.  
> **username_0**: @username_3 The regression would just be the regression of Y on C, I, G and X-M. Notice that we would get a coefficient of 1, as you indicated. What I am comparing is not a regression of 1 on the contribution of each of the components C, I, G and X-M, but rather, the average contribution of say, C to Y (hence E[C/Y] across observations), to the partial R2 obtained by a regression of Y on C (or the R2 of Y on C, when C and other components are independent).  

---

