covTest (version 1.02)

predict.lars.en: Function to make predictions from lars.en fit

Description

Function to make predictions from lars.en fit

Usage

"predict"(object, x, lambda, ...)

Arguments

object
Result of call to lars.en
x
N by p matrix of predictors
lambda
Value of L1- regularization parameter at which predictions are desired
...
additional arguments (not used)

Value

Vector of predicted values.

Details

Makes predictions from an objected returned by lars.en

References

Hui Zou and Trevor Hastie. Regularization and Variable Selection via the Elastic Net. JRSSB (2005) 67(2) 301-320.

See Also

lars.en, covTest

Examples

Run this code
x=matrix(rnorm(100*10),ncol=10)
x=scale(x,TRUE,TRUE)/sqrt(99)
y=4*x[,2]+rnorm(100)
a=lars.en(x,y,lambda2=1)
yhat=predict.lars.en(a,x,.5)

Run the code above in your browser using DataLab