# How to calculate R-square from adjusted r-square, n, and p?

Let $\bar{R}^2$ denote the adjusted coefficient of determination.

I have $\bar{R}^2 = 0.9199$ with 15 cases. Now I am trying to find $R^2$ given the results below.

I found the formula for $R^2$ but did not understand it. How do you calculate $R^2$ from $\bar{R}^2$?

$\bar{R}^2 = 1-\dfrac{(n-1)(1- R^2)}{n-p-1}$

-
0.9199=1-(15-i)(1-RSQ)/(15-p), like this? But p unknown and i unknown?! –  hhh May 24 '13 at 9:48
The wikipedia page says that the $i$ should be a $1$ and that $p$ is the number of regressors not counting the constant term. This would be $2$ in your case. Now, you should be able to isolate $R^2$. –  Stefan Hansen May 27 '13 at 5:43

Given the equation for $\bar{R}^2$ you have:

$\bar{R}^2 = 1-\dfrac{(n-1)(1- R^2)}{n-p-1}$

You have $3$ regressors and a sample of $15$, thus substituting these and $\bar{R}2$ into the equation yields:

$0.9199 = 1 - \dfrac{(15-1)(1-R^2)}{15-3-1}$

Rearranging this expression and solving for $R^2$ gives:

$R^2 = 0.9371$

-

Well, I think there is a little mistake in the equation. $p$ stands for the number of parameters, which means the number of predictors plus one for the constant.

$k$ stands for the number of predictors. Thus, \begin{align} p=k+1\tag{1}. \end{align}

The equation using $p$ is as follows: \begin{align} 1-\frac{(n-1)(1-R^2)}{n-p} \tag{2}. \end{align}

If you substitute equation $(1)$ in $(2)$ you got $$1-\frac{(n-1)(1-R^2)}{n-(k+1)}=1-\frac{(n-1)(1-R^2)}{n-k-1}.$$ The equation using $k$ is as follows: $$1-\frac{(n-1)(1-R^2)}{n-k-1}.$$ I know it is very common mistake. The degree of freedom for the SSR is $p-1$. For simple regression, the $\mathrm{df}$ of SSR is either $k=p-1=1$.

-