larsR:

Usage Arguments Examples

Usage

1
larsR(x, y, type = "lasso", xout = FALSE, outfun = out)

Arguments

x
y
type
xout
outfun

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
##---- 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, type = "lasso", xout = FALSE, outfun = out) 
{
    library(lars)
    p = ncol(x)
    p1 = p + 1
    xy = elimna(cbind(x, y))
    if (xout) {
        x <- xy[, 1:p]
        y <- xy[, p1]
        m <- cbind(x, y)
        flag <- outfun(x, plotit = FALSE)$keep
        m <- m[flag, ]
        x <- m[, 1:p]
        y <- m[, p1]
        xy = cbind(x, y)
    }
    result = lars(xy[, 1:p], xy[, p1], type = type)
    result
  }

musto101/wilcox_R documentation built on May 23, 2019, 10:52 a.m.