Learn R Programming

measures (version 0.3)

ARSQ: Adjusted coefficient of determination

Description

Defined as: 1 - (1 - rsq) * (p / (n - p - 1L)). Adjusted R-squared is only defined for normal linear regression.

Usage

ARSQ(truth, response, n, p)

Arguments

truth

[numeric] vector of true values

response

[numeric] vector of predicted values

n

[numeric] number of observations

p

[numeric] number of predictors

Examples

Run this code
# NOT RUN {
n = 20
p = 5
set.seed(123)
truth = rnorm(n)
response = rnorm(n)
ARSQ(truth, response, n, p)
# }

Run the code above in your browser using DataLab