1 | wrregfun(slope, x = x, y = y)
|
slope |
|
x |
|
y |
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
function (slope, x = x, y = y)
{
x <- as.matrix(x)
res <- y - x %*% slope
v1 <- rank(res)
v2 <- sqrt(12) * (v1/(length(y) + 1) - 0.5)
wrregfun <- sum(v2 * res)
wrregfun
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.