| predict.LarsPath | R Documentation | 
Predict response of a new sample Xnew at a given level of penalty
## S3 method for class 'LarsPath'
predict(object, Xnew, lambda, mode = c("fraction", "lambda", "norm"), ...)
| object | a LarsParth object | 
| Xnew | a matrix (of size n*object@p) of covariates. | 
| lambda | If mode ="norm", lambda represents the l1-norm of the coefficients with which we want to predict. If mode="fraction", lambda represents the ratio (l1-norm of the coefficients with which we want to predict)/(l1-norm maximal of the LarsPath object). | 
| mode | "fraction", "lambda" or "norm". | 
| ... | other arguments. Not used. | 
The predicted response
Quentin Grimonprez
dataset <- simul(50, 10000, 0.4, 10, 50, matrix(c(0.1, 0.8, 0.02, 0.02), nrow = 2))
result <- HDlars(dataset$data[1:40, ], dataset$response[1:40])
y <- predict(result, dataset$data[41:50, ], 0.3, "fraction")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.