Description Usage Arguments Details Author(s) References See Also Examples
Outputs predicted response values for new user input observations at a specified lambda
value
1 | predictSGL(x, newX, lam)
|
x |
fitted |
newX |
covariate matrix for new observations whose responses we wish to predict |
lam |
the index of the lambda value for the model with which we desire to predict |
Predicted outcomes are given
Noah Simon, Jerome Friedman, Trevor Hastie, and Rob Tibshirani
Maintainer: Noah Simon <nsimon@stanford.edu>
Simon, N., Friedman, J., Hastie T., and Tibshirani, R. (2011)
A Sparse-Group Lasso,
http://www-stat.stanford.edu/~nsimon/SGL.pdf
1 2 3 4 5 6 7 8 9 | n = 50; p = 100; size.groups = 10
index <- ceiling(1:p / size.groups)
X = matrix(rnorm(n * p), ncol = p, nrow = n)
beta = (-2:2)
y = X[,1:5] %*% beta + 0.1*rnorm(n)
data = list(x = X, y = y)
Fit = SGL(data, index, type = "linear")
X.new = matrix(rnorm(n * p), ncol = p, nrow = n)
predictSGL(Fit, X.new, 5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.