I am interested in how to calculate portion of explained variance of each individual independend variable in regression equation.
So regression model is $y=b_{0}+b_{1}x_{1}+...b_{n}x_{k}+\epsilon$ and suppose I even know true values of $b$ and have data for all $x$. It is clear how to find portion of variance explained by $\epsilon$ (just $\frac{var(\epsilon)}{var(y)}$), but how to make this trick to each $x$ if they are correlated? So the problem as I see is that additional covariations between $x$'s do not let repeat the technick applied to disturbance term because each $x_{i}$ contribute to y variation through var(x) as well as throught $cov(x_{i},x_{-i})$.
The problem I am interested in has been rised beofre in topic How to split r-squared between predictor variables in multiple regression?
In order to handle with this problem in matlab function anova(reg) can be used where reg is an fitlm object. But I am strongly interested in how to make these calculations by hand.
Will be very greatfull for help!