I was trying to understand how adjusted $R^2$ in a simple linear regression behaves when there exists multicolinearity. And realized I could not replicate the adjusted $R^2$ provided by excel data analysis pack, when I had multiple same input variables.
I created a data set like below:
Excel returns R Square and ANOVA table as below:
I could replicate the $R^2$ number
$$1 - \frac{SS_{res}}{SS_{tot}}.$$
However, for adjusted $R^2$, my calculation
$$1 - \frac{SS_{res}/(n-k-1)}{SS_{tot}/(n-1)},$$
where $n$ is number of observations and $k$ is number of variables, not including intercept) yields $1 - \frac{1.983/(9-3-1)}{60/(9-1)} = 0.9471$, which is very different from the excel output (0.6765).
I think I might be using the wrong degrees of freedom here but couldn't figure out what's the exact problem.