Description Usage Arguments Examples
Computes extended set of regression parameters: R2ex
1 | regr_param_ex(predval, expval, trainval)
|
predval |
|
expval |
|
trainval |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
regr_param_ex <- function(predval, expval, trainval) {
n_p <- length(predval)
rss <- 0
for (i in 1:n_p) {
rss <- rss + (predval[i] - expval[i]) * (predval[i] - expval[i])
}
r2ex <- 1 - ((rss/(n_p-1)) / var(trainval))
r2ex
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.