Calculates the adjusted coefficient of determination $$ \bar{R}^{2} = 1 - \left(\frac{RSS / \left( n - k \right)} {TSS / \left( n - 1 \right)} \right) = 1 - \left( 1 - R^2 \right) \frac{n - 1}{n - k} . $$
.Rbar2(R2 = NULL, n, k, X, y, fromRSS = TRUE)
R2 | Numeric. Coefficient of determination \(R^2\) . |
---|---|
n | Integer. Sample size. |
k | Integer. Number of regressors including a regressor whose value is 1 for each observation. |
X |
|
y | Numeric vector of length |
fromRSS | Logical.
If |
Returns the adjusted coefficient of determination \(\bar{R}^{2}\) .
If R2 = NULL
, R2
is computed using R2()
with X
and y
as required arguments.
If R2
is provided, X
, and y
are not needed.
Wikipedia: Residual Sum of Squares
Wikipedia: Explained Sum of Squares
Wikipedia: Total Sum of Squares
Wikipedia: Coefficient of Determination
Other assessment of model quality functions:
.MSE()
,
.R2fromESS()
,
.R2fromRSS()
,
.RMSE()
,
.model()
,
MSE()
,
R2()
,
RMSE()
,
Rbar2()
,
model()
Ivan Jacob Agaloos Pesigan