# R Ridge Regression: Choosing best lambda

I am doing ridge regression with Mass package and stuck with the problem trying to find the best lambda. I know that it should look somehow like thi

lm.ridge(y ~x1 + x2+ x3...data = data, lambda=seq(0,1,.1))
help <- lm.ridge(y ~x1 + x2+ x3...data = data, lambda=seq(0,1,.1))
plot(help)
select(help)


select(help) gives me the following output:

modified HKB estimator is 13.50453
modified L-W estimator is 85.33649
smallest value of GCV  at 1


But what is my best lambda the? The smallest value for GCV? Also I don't understand what values I should pick for

lambda=seq(0,1,.1)


I hope someone can help me!

• Sometimes I have better results by optimizing the effective AIC. This is implemented in the R rms package ols and pentrace functions. This may be more stable than cross-validation. More may be found here: biostat.mc.vanderbilt.edu/wiki/pub/Main/FHHandouts/iscb98.pdf – Frank Harrell Jun 22 '19 at 21:31