1 |
x |
|
y |
|
p |
|
locfun |
|
scat |
|
est |
|
cov.fun |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | ##---- 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 (x, y, p = 1, locfun = lloc, scat = var, est = mean,
cov.fun = cov.mba)
{
xy = cbind(x, y)
xy <- elimna(xy)
m <- ncol(x)
x = xy[, 1:m]
n <- nrow(x)
m1 = m + 1
y = xy[, m1]
x = standm(x, locfun = locfun, est = est, scat = scat)
vals = NA
if (p == 1)
for (j in 1:m) {
vals[j] = gvarg(cbind(y, x[, j]), cov.fun)
}
if (p > 1) {
temp = modgen(m)
ic = 0
for (j in 1:length(temp)) {
if (length(temp[[j]]) == p) {
ic = ic + 1
vals[ic] = gvarg(cbind(y, x[, temp[[j]]]), cov.fun)
z = cbind(y, x[, temp[[j]]])
}
}
}
vals
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.