linearRidge function from
ridge package and
lm.ridge from the
MASS package are two good options for developing the ridge regression models.
OFobject may still be there in your session, let us again load it by using
ridgepackage by using
30, obtain the ridge regression coefficients with the following single line R code:
LR <-linearRidge(Y~poly(X,3),data=as.data.frame(OF),lambda =c(0, 0.5,1,1.5,2,5,10,30)) LR
linearRidge from the
ridge package performs the ridge regression for a linear ...