library("MASS")
bhd <- Boston[,-9]
# find lambda
lmridge <- lm.ridge(medv~., data=bhd, lambda=seq(0, 10, 0.01))
select(lmridge)
# ridge traces
plot(lmridge)
# compare coefficients
lm(medv~., data=bhd)
lm.ridge(medv~., data=bhd, lambda=8.98)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.